Add missing TAU dist files 24/213724/1 tizen_5.5
authorPawel Kaczmarczyk <p.kaczmarczy@samsung.com>
Tue, 10 Sep 2019 13:27:49 +0000 (15:27 +0200)
committerPawel Kaczmarczyk <p.kaczmarczy@samsung.com>
Tue, 10 Sep 2019 13:27:49 +0000 (15:27 +0200)
TAU version did not change since last commit.

Change-Id: If11fd38d8986d1d62bc60c139716f9867acae9de
Signed-off-by: Pawel Kaczmarczyk <p.kaczmarczy@samsung.com>
49 files changed:
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests01/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests02/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests03/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests04/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests05/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests06/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.min.js [new file with mode: 0644]
mobile/tct-webuifw-tests07/tests/libs/dist/theme/default/images/dimmer/lightbulb.png [new file with mode: 0644]

diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests01/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests01/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests01/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests01/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests02/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests02/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests02/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests02/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests03/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests03/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests03/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests03/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests04/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests04/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests04/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests04/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests05/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests05/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests05/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests05/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests06/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests06/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests06/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests06/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.js
new file mode 100644 (file)
index 0000000..c4338f5
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,n){n(2),e.exports=n(4)},function(e,t,n){n(0)(n(3))},function(e,t){e.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n'},function(e,t,n){n(0)(n(5))},function(e,t){e.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.min.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.flipster.min.js
new file mode 100644 (file)
index 0000000..244613e
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),a.exports=c(4)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */\n!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,p=/^-ms-/,q=/-([\\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\\\x20\\\\t\\\\r\\\\n\\\\f]",N="(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+",O=N.replace("w","w#"),P="\\\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|("+O+"))|)"+M+"*\\\\]",Q=":("+N+")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|"+P+")*)|.*)\\\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\\\]\'\\"]*?)"+M+"*\\\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\("+M+"*(even|odd|(([+-]|)(\\\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\\\d+)|))"+M+"*\\\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\("+M+"*((?:-\\\\d)?\\\\d*)"+M+"*\\\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\\d$/i,$=/^[^{]+\\{\\s*\\[native \\w/,_=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,ab=/[+~]/,bb=/\'|\\\\/g,cb=new RegExp("\\\\\\\\([\\\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\\\$&"):b.setAttribute("id",s),s="[id=\'"+s+"\'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class=\'a\'></div><div class=\'a i\'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=\'\'><option selected=\'\'></option></select>",a.querySelectorAll("[msallowclip^=\'\']").length&&q.push("[*^$]="+M+"*(?:\'\'|\\"\\")"),a.querySelectorAll("[selected]").length||q.push("\\\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!=\'\']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"=\'$1\']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href=\'#\'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^.[^:#\\[\\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)\n},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\\\.)"+p.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\\\.)"+r.join("\\\\.(?:.*\\\\.|)")+"(\\\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},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(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bb=/<([\\w:]+)/,cb=/<|&#?\\w+;/,db=/<(?:script|style|link)/i,eb=/checked\\s*(?:[^=]|=\\s*.checked.)/i,fb=/^$|\\/(?:java|ecma)script/i,gb=/^true\\/(.*)/,hb=/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,ib={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,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))\n},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\\t\\r\\n\\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \\t]*([^\\r\\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\\/\\//,mc=/^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\\[\\]$/,yc=/\\r?\\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\\r\\n")}}):{name:b.name,value:c.replace(yc,"\\r\\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\\?(?=&|$)|\\?\\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});\n';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! jQuery.Flipster, v1.1.2 (built 2017-11-10) */\n!function(a,b,c){"use strict";function d(a,b){var c=null;return function(){var d=this,e=arguments;null===c&&(c=setTimeout(function(){a.apply(d,e),c=null},b))}}var e=function(){var a={};return function(b){if(a[b]!==c)return a[b];var d=document.createElement("div"),e=d.style,f=b.charAt(0).toUpperCase()+b.slice(1),g=["webkit","moz","ms","o"],h=(b+" "+g.join(f+" ")+f).split(" ");for(var i in h)if(h[i]in e)return a[b]=h[i];return a[b]=!1}}(),f="http://www.w3.org/2000/svg",g=function(){var a;return function(){if(a!==c)return a;var b=document.createElement("div");return b.innerHTML="<svg/>",a=b.firstChild&&b.firstChild.namespaceURI===f}}(),h=a(b),i=e("transform"),j={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},k={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},l=new RegExp("\\\\b("+k.itemCurrent+"|"+k.itemPast+"|"+k.itemFuture+")(.*?)(\\\\s|$)","g"),m=new RegExp("\\\\s\\\\s+","g");a.fn.flipster=function(b){if("string"==typeof b){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("methods");return c[b]?c[b].apply(this,e):this})}var n=a.extend({},j,b);return this.each(function(){function b(a){var b="next"===a?n.buttonNext:n.buttonPrev;return"custom"!==n.buttons&&g?\'<svg viewBox="0 0 13 20" xmlns="\'+f+\'" aria-labelledby="title"><title>\'+b+\'</title><polyline points="10,3 3,10 10,17"\'+("next"===a?\' transform="rotate(180 6.5,10)"\':"")+"/></svg>":b}function e(c){return c=c||"next",a(\'<button class="\'+k.button+" "+("next"===c?k.buttonNext:k.buttonPrev)+\'" role="button" />\').html(b(c)).on("click",function(a){v(c),a.preventDefault()})}function j(){n.buttons&&J.length>1&&(O.find("."+k.button).remove(),O.append(e("prev"),e("next")))}function o(){var b={};!n.nav||J.length<=1||(L&&L.remove(),L=a(\'<ul class="\'+k.nav+\'" role="navigation" />\'),N=a(""),J.each(function(c){var d=a(this),e=d.data("flip-category"),f=d.data("flip-title")||d.attr("title")||c,g=a(\'<a href="#" class="\'+k.navLink+\'">\'+f+"</a>").data("index",c);if(N=N.add(g),e){if(!b[e]){var h=a(\'<li class="\'+k.navItem+" "+k.navCategory+\'">\'),i=a(\'<a href="#" class="\'+k.navLink+" "+k.navCategoryLink+\'" data-flip-category="\'+e+\'">\'+e+"</a>").data("category",e).data("index",c);b[e]=a(\'<ul class="\'+k.navChild+\'" />\'),N=N.add(i),h.append(i,b[e]).appendTo(L)}b[e].append(g)}else L.append(g);g.wrap(\'<li class="\'+k.navItem+\'">\')}),L.on("click","a",function(b){var c=a(this).data("index");c>=0&&(v(c),b.preventDefault())}),"after"===n.nav?O.append(L):O.prepend(L),M=L.find("."+k.navItem))}function p(){if(n.nav){var b=K.data("flip-category");M.removeClass(k.navCurrent),N.filter(function(){return a(this).data("index")===Q||b&&a(this).data("category")===b}).parent().addClass(k.navCurrent)}}function q(){O.css("transition","none"),G.css("transition","none"),J.css("transition","none")}function r(){O.css("transition",""),G.css("transition",""),J.css("transition","")}function s(){var b,c=0;return J.each(function(){(b=a(this).height())>c&&(c=b)}),c}function t(b){if(b&&q(),H=G.width(),G.height(s()),!H)return void(I=I||setInterval(function(){t(b)},500));I&&(clearInterval(I),I=!1),J.each(function(c){var d,e,f=a(this);f.attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")}),d=f.outerWidth(),0!==n.spacing&&f.css("margin-right",d*n.spacing+"px"),e=f.position().left,P[c]=-1*(e+d/2-H/2),c===J.length-1&&(u(),b&&setTimeout(r,1))})}function u(){var b,d,e,f=J.length;J.each(function(c){b=a(this),d=" ",c===Q?(d+=k.itemCurrent,e=f+1):c<Q?(d+=k.itemPast+" "+k.itemPast+"-"+(Q-c),e=f-(Q-c)):(d+=k.itemFuture+" "+k.itemFuture+"-"+(c-Q),e=f-(c-Q)),b.css("z-index",e).attr("class",function(a,b){return b&&b.replace(l,"").replace(m," ")+d})}),Q>=0&&(H&&P[Q]!==c||t(!0),i?G.css("transform","translateX("+P[Q]+"px)"):G.css({left:P[Q]+"px"})),p()}function v(a){var b=Q;if(!(J.length<=1))return"prev"===a?Q>0?Q--:n.loop&&(Q=J.length-1):"next"===a?Q<J.length-1?Q++:n.loop&&(Q=0):"number"==typeof a?Q=a:a!==c&&(Q=J.index(a),n.loop&&b!=Q&&(b==J.length-1&&Q!=J.length-2&&(Q=0),0==b&&1!=Q&&(Q=J.length-1))),K=J.eq(Q),Q!==b&&n.onItemSwitch&&n.onItemSwitch.call(O,J[Q],J[b]),u(),O}function w(a){return n.autoplay=a||n.autoplay,clearInterval(R),R=setInterval(function(){var a=Q;v("next"),a!==Q||n.loop||clearInterval(R)},n.autoplay),O}function x(){return clearInterval(R),R=0,O}function y(a){return x(),n.autoplay&&a&&(R=-1),O}function z(){O.hide().css("visibility","").addClass(k.active).fadeIn(n.fadeIn)}function A(){if(G=O.find(n.itemContainer).addClass(k.container),J=G.find(n.itemSelector),!(J.length<=1))return J.addClass(k.item).each(function(){var b=a(this);b.children("."+k.itemContent).length||b.wrapInner(\'<div class="\'+k.itemContent+\'" />\')}),n.click&&J.on("click.flipster touchend.flipster",function(b){S||(a(this).hasClass(k.itemCurrent)||b.preventDefault(),v(this))}),j(),o(),Q>=0&&v(Q),O}function B(a){n.keyboard&&(a[0].tabIndex=0,a.on("keydown.flipster",d(function(a){var b=a.which;37!==b&&39!==b||(v(37===b?"prev":"next"),a.preventDefault())},250,!0)))}function C(a){if(n.scrollwheel){var b,c,e=!1,f=0,g=0,i=0,j=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());a.on("mousewheel.flipster wheel.flipster",function(){e=!0}).on("mousewheel.flipster wheel.flipster",d(function(a){clearTimeout(g),g=setTimeout(function(){f=0,i=0},300),a=a.originalEvent,i+=a.wheelDelta||-1*(a.deltaY+a.deltaX),Math.abs(i)<25&&!j||(f++,b=i>0?"prev":"next",c!==b&&(f=0),c=b,(f<6||f%3==0)&&v(b),i=0)},50)),h.on("mousewheel.flipster wheel.flipster",function(a){e&&(a.preventDefault(),e=!1)})}}function D(a){if(n.touch){var b,c,d,e,f,g;a.on({"touchstart.flipster":function(a){a=a.originalEvent,b=a.touches?a.touches[0].clientX:a.clientX,c=a.touches?a.touches[0].clientY:a.clientY},"touchmove.flipster":function(a){a=a.originalEvent,d=a.touches?a.touches[0].clientX:a.clientX,e=a.touches?a.touches[0].clientY:a.clientY,g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&a.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){g=d-b,f=e-c,Math.abs(g)>30&&Math.abs(f)<100&&v(g>0?"prev":"next")}})}}function E(){var a;if(O.css("visibility","hidden"),A(),J.length<=1)return void O.css("visibility","");a=!!n.style&&"flipster--"+n.style.split(" ").join(" flipster--"),O.addClass([k.main,i?"flipster--transform":" flipster--no-transform",a,n.click?"flipster--click":""].join(" ")),n.start&&(Q="center"===n.start?Math.floor(J.length/2):n.start),v(Q);var b=O.find("img");if(b.length){var c=0;b.on("load",function(){++c>=b.length&&z()}),setTimeout(z,750)}else z();h.on("resize.flipster",d(t,400)),n.autoplay&&w(),n.pauseOnHover&&G.on("mouseenter.flipster",function(){R?y(!0):x()}).on("mouseleave.flipster",function(){-1===R&&w()}),B(O),C(G),D(G)}var F,G,H,I,J,K,L,M,N,O=a(this),P=[],Q=0,R=!1,S=!1;F={jump:v,next:function(){return v("next")},prev:function(){return v("prev")},play:w,stop:x,pause:y,index:A},O.data("methods",F),O.hasClass(k.active)||E()})}}(jQuery,window);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.js
new file mode 100644 (file)
index 0000000..f33ad7a
--- /dev/null
@@ -0,0 +1 @@
+!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e,t){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):t("EvalError: No eval function available")}catch(e){t(e)}}},function(e,t,a){a(2),a(4),e.exports=a(6)},function(e,t,a){a(0)(a(3))},function(e,t){e.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("\t","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();'},function(e,t,a){a(0)(a(5))},function(e,t){e.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" → ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"…"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});'},function(e,t,a){var n=a(7);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(9)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(8)(!1)).push([e.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""])},function(e,t,a){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a=function(e,t){var a=e[1]||"",n=e[3];if(!n)return a;if(t&&"function"==typeof btoa){var r=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[a].concat(i).concat([r]).join("\n")}var o;return[a].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(e,a){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var i=this[r][0];null!=i&&(n[i]=!0)}for(r=0;r<e.length;r++){var o=e[r];null!=o[0]&&n[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),t.push(o))}},t}},function(e,t,a){var n,r,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),c=function(e){var t={};return function(e,a){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e,t){return t?t.querySelector(e):document.querySelector(e)}.call(this,e,a);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,f=[],s=a(10);function d(e,t){for(var a=0;a<e.length;a++){var n=e[a],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(k(n.parts[o],t))}else{var c=[];for(o=0;o<n.parts.length;o++)c.push(k(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:c}}}}function b(e,t){for(var a=[],n={},r=0;r<e.length;r++){var i=e[r],o=t.base?i[0]+t.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(c):a.push(n[o]={id:o,parts:[c]})}return a}function h(e,t){var a=c(e.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=f[f.length-1];if("top"===e.insertAt)n?n.nextSibling?a.insertBefore(t,n.nextSibling):a.appendChild(t):a.insertBefore(t,a.firstChild),f.push(t);else if("bottom"===e.insertAt)a.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(e.insertAt.before,a);a.insertBefore(t,r)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function p(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return a.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),h(e,t),t}function m(e,t){Object.keys(t).forEach(function(a){e.setAttribute(a,t[a])})}function k(e,t){var a,n,r,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;a=l||(l=p(t)),n=_.bind(null,a,o,!1),r=_.bind(null,a,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),h(e,t),t}(t),n=function(e,t,a){var n=a.css,r=a.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=s(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(o),c&&URL.revokeObjectURL(c)}.bind(null,a,t),r=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=p(t),n=function(e,t){var a=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=a;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(a))}}.bind(null,a),r=function(){g(a)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var a=b(e,t);return d(a,t),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r];(c=i[o.id]).refs--,n.push(c)}e&&d(b(e,t),t);for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}};var y,v=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function _(e,t,a,n){var r=a?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var a=t.protocol+"//"+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?a+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.min.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.graphs.min.js
new file mode 100644 (file)
index 0000000..07920e0
--- /dev/null
@@ -0,0 +1,4 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=1)}([function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b,c){c(2),c(4),a.exports=c(6)},function(a,b,c){c(0)(c(3))},function(a,b){a.exports='!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function a(n){return n.length}function o(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function s(n){return(n+="")===xa||n[0]===ba?ba+n:n}function f(n){return(n+="")[0]===ba?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_a.length;r>e;++e){var u=_a[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,u){var i,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,i=e.indexOf(a)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){oa.event.preventDefault()}function k(){for(var n,t=oa.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=oa.event;u.target=n,oa.event=u,t[u.type].apply(e,r)}finally{oa.event=i}}},t}function E(n){return Sa(n,Aa),n}function A(n){return"function"==typeof n?n:function(){return ka(n,this)}}function C(n){return"function"==typeof n?n:function(){return Na(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=oa.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?o:a:n.local?i:u}function L(n){return n.trim().replace(/\\s+/g," ")}function q(n){return new RegExp("(?:^|\\\\s+)"+oa.requote(n)+"(?:\\\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",L(u+" "+n))):e.setAttribute("class",L(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=oa.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ea(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],a=0,o=i.length;o>a;a++)(u=i[a])&&t(u,a,e);return n}function Z(n){return Sa(n,La),n}function V(n){var t,e;return function(r,u,i){var a,o=n[i].update,l=o.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(a=o[t])&&++t<l;);return a}}function X(n,t,e){function r(){var t=this[a];t&&(this.removeEventListener(n,t,t.$),delete this[a])}function u(){var u=l(t,ca(arguments));r.call(this),this.addEventListener(n,this[a]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+oa.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var a="__on"+n,o=n.indexOf("."),l=$;o>0&&(n=n.slice(0,o));var c=qa.get(n);return c&&(n=c,l=B),o?t?u:r:t?b:i}function $(n,t){return function(e){var r=oa.event;oa.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{oa.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Ra,u="click"+r,i=oa.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ta&&(Ta="onselectstart"in e?!1:x(e.style,"userSelect")),Ta){var a=n(e).style,o=a[Ta];a[Ta]="none"}return function(n){if(i.on(r,null),Ta&&(a[Ta]=o),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Da){var i=t(n);if(i.scrollX||i.scrollY){r=oa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}function G(){return oa.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?ja:Math.acos(n)}function tn(n){return n>1?Oa:-1>n?-Oa:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function on(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(a-i)*n/60:180>n?a:240>n?i+(a-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,a;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+t):e+t-e*t,i=2*e-a,new yn(u(n+120),u(n),u(n-120))}function sn(n,t,e){return this instanceof sn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof sn?new sn(n.h,n.c,n.l):n instanceof hn?pn(n.l,n.a,n.b):pn((n=Sn((n=oa.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new sn(n,t,e)}function fn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Ia)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof sn?fn(n.h,n.c,n.l):Sn((n=yn(n)).r,n.g,n.b):new hn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=vn(u)*Qa,r=vn(r)*no,i=vn(i)*to,new yn(mn(3.2404542*u-1.5371385*r-.4985314*i),mn(-.969266*u+1.8760108*r+.041556*i),mn(.0556434*u-.2040259*r+1.0572252*i))}function pn(n,t,e){return n>0?new sn(Math.atan2(e,t)*Ya,Math.sqrt(t*t+e*e),n):new sn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function yn(n,t,e){return this instanceof yn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof yn?new yn(n.r,n.g,n.b):_n(""+n,yn,cn):new yn(n,t,e)}function Mn(n){return new yn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,u,i,a=0,o=0,l=0;if(r=/([a-z]+)\\((.*)\\)/.exec(n=n.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Nn(u[0]),Nn(u[1]),Nn(u[2]))}return(i=uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(a=(3840&i)>>4,a=a>>4|a,o=240&i,o=o>>4|o,l=15&i,l=l<<4|l):7===n.length&&(a=(16711680&i)>>16,o=(65280&i)>>8,l=255&i)),t(a,o,l))}function wn(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),a=Math.max(n,t,e),o=a-i,l=(a+i)/2;return o?(u=.5>l?o/(a+i):o/(2-a-i),r=n==a?(t-e)/o+(e>t?6:0):t==a?(e-n)/o+2:(n-t)/o+4,r*=60):(r=NaN,u=l>0&&1>l?0:r),new ln(r,u,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/Qa),u=dn((.2126729*n+.7151522*t+.072175*e)/no),i=dn((.0193339*n+.119192*t+.9503041*e)/to);return hn(116*u-16,500*(r-u),200*(u-i))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function u(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(i,l)}catch(r){return void a.error.call(i,r)}a.load.call(i,n)}else a.error.call(i,l)}var i={},a=oa.dispatch("beforesend","progress","load","error"),o={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\\/\\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=u:l.onreadystatechange=function(){l.readyState>3&&u()},l.onprogress=function(n){var t=oa.event;oa.event=n;try{a.progress.call(i,l)}finally{oa.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?o[n]:(null==t?delete o[n]:o[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(c=n,i):c},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ca(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in o||(o.accept=t+",*/*"),l.setRequestHeader)for(var s in o)l.setRequestHeader(s,o[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},oa.rebind(i,a,"on"),null==r?i:i.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,n:null};return ao?ao.n=i:io=i,ao=i,oo||(lo=clearTimeout(lo),oo=1,co(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(lo),lo=setTimeout(Tn,t)),oo=0):(oo=1,co(Tn))}function Rn(){for(var n=Date.now(),t=io;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=io,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:io=t.n;return ao=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*Ma(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],a=0,o=r[0],l=0;u>0&&o>0&&(l+o+1>t&&(o=Math.max(1,t-l)),i.push(n.substring(u-=o,u+o)),!((l+=o+1)>t));)o=r[a=(a+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=fo.exec(n),r=e[1]||" ",a=e[2]||">",o=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===l&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=ho.get(g)||Fn;var M=c&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===o?"":o;if(0>p){var l=oa.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===a?u+n+k:">"===a?k+u+n:"^"===a?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new po(e-1)),1),e}function i(n,e){return t(n=new po(+n),e),n}function a(n,r,i){var a=u(n),o=[];if(i>1)for(;r>a;)e(a)%i||o.push(new Date(+a)),t(a,1);else for(;r>a;)o.push(new Date(+a)),t(a,1);return o}function o(n,t,e){try{po=Hn;var r=new Hn;return r._=n,a(r,t,e)}finally{po=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=a;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(u),l.offset=In(i),l.range=o,n}function In(n){return function(t,e){try{po=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{po=Date}}}function Yn(n){function t(n){function t(t){for(var e,u,i,a=[],o=-1,l=0;++o<r;)37===n.charCodeAt(o)&&(a.push(n.slice(l,o)),null!=(u=mo[e=n.charAt(++o)])&&(e=n.charAt(++o)),(i=A[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),a.push(e),l=o+1);return a.push(n.slice(l,o)),a.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&po!==Hn,a=new(i?Hn:po);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?a._:a},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,a,o=0,l=t.length,c=e.length;l>o;){if(r>=c)return-1;if(u=t.charCodeAt(o++),37===u){if(a=t.charAt(o++),i=C[a in mo?t.charAt(o++):a],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{po=Hn;var t=new po;return t._=n,r(t)}finally{po=Date}}var r=t(n);return e.parse=function(n){try{po=Hn;var t=r.parse(n);return t&&t._}finally{po=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=oa.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(m),k=Xn(m),N=Vn(y),E=Xn(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+go.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(go.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(go.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:ot,"%":function(){return"%"}},C={a:r,A:u,b:i,B:a,c:o,d:tt,e:tt,H:rt,I:rt,j:et,L:at,m:nt,M:ut,p:s,S:it,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Vn(n){return new RegExp("^(?:"+n.map(oa.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ut(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function it(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){yo.lastIndex=0;var r=yo.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ot(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=Ma(t)/60|0,u=Ma(t)%60;return e+Zn(r,"0",2)+Zn(u,"0",2)}function lt(n,t,e){Mo.lastIndex=0;var r=Mo.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function st(){}function ft(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ht(n,t){n&&wo.hasOwnProperty(n.type)&&wo[n.type](n,t)}function gt(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function pt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Ia,t=t*Ia/2+ja/4;var e=n-r,a=e>=0?1:-1,o=a*e,l=Math.cos(t),c=Math.sin(t),s=i*c,f=u*l+s*Math.cos(o),h=s*a*Math.sin(o);ko.add(Math.atan2(h,f)),r=n,u=l,i=c}var t,e,r,u,i;No.point=function(a,o){No.point=n,r=(t=a)*Ia,u=Math.cos(o=(e=o)*Ia/2+ja/4),i=Math.sin(o)},No.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function yt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return Ma(n[0]-t[0])<Pa&&Ma(n[1]-t[1])<Pa}function St(n,t){n*=Ia;var e=Math.cos(t*=Ia);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Eo,Co+=(n-Co)/Eo,zo+=(t-zo)/Eo,Lo+=(e-Lo)/Eo}function Nt(){function n(n,u){n*=Ia;var i=Math.cos(u*=Ia),a=i*Math.cos(n),o=i*Math.sin(n),l=Math.sin(u),c=Math.atan2(Math.sqrt((c=e*l-r*o)*c+(c=r*a-t*l)*c+(c=t*o-e*a)*c),t*a+e*o+r*l);Ao+=c,qo+=c*(t+(t=a)),To+=c*(e+(e=o)),Ro+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;jo.point=function(u,i){u*=Ia;var a=Math.cos(i*=Ia);t=a*Math.cos(u),e=a*Math.sin(u),r=Math.sin(i),jo.point=n,kt(t,e,r)}}function Et(){jo.point=St}function At(){function n(n,t){n*=Ia;var e=Math.cos(t*=Ia),a=e*Math.cos(n),o=e*Math.sin(n),l=Math.sin(t),c=u*l-i*o,s=i*a-r*l,f=r*o-u*a,h=Math.sqrt(c*c+s*s+f*f),g=r*a+u*o+i*l,p=h&&-nn(g)/h,v=Math.atan2(h,g);Do+=p*c,Po+=p*s,Uo+=p*f,Ao+=v,qo+=v*(r+(r=a)),To+=v*(u+(u=o)),Ro+=v*(i+(i=l)),kt(r,u,i)}var t,e,r,u,i;jo.point=function(a,o){t=a,e=o,jo.point=n,a*=Ia;var l=Math.cos(o*=Ia);r=l*Math.cos(a),u=l*Math.sin(a),i=Math.sin(o),kt(r,u,i)},jo.lineEnd=function(){n(t,e),jo.lineEnd=Et,jo.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,u){var i=[],a=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){u.lineStart();for(var o=0;t>o;++o)u.point((e=n[o])[0],e[1]);return void u.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,i.push(l),a.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,i.push(l),a.push(c)}}),a.sort(t),qt(i),qt(a),i.length){for(var o=0,l=e,c=a.length;c>o;++o)a[o].e=l=!l;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var o=0,c=s.length;c>o;++o)u.point((f=s[o])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var o=s.length-1;o>=0;--o)u.point((f=s[o])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(u,i){function a(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function o(n,t){var e=u(n,t);d.point(e[0],e[1])}function l(){y.point=o,d.lineStart()}function c(){y.point=a,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,a=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++a<r;)i.point((u=n[a])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Dt))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:c,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=c,g=oa.merge(g);var n=Ot(m,p);g.length?(b||(i.polygonStart(),b=!0),Lt(g,Ut,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Pt(),x=t(M),b=!1;return y}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Oa-Pa:Oa-n[1])-((t=t.x)[0]<0?t[1]-Oa-Pa:Oa-t[1])}function jt(n){var t,e=NaN,r=NaN,u=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var o=i>0?ja:-ja,l=Ma(i-e);Ma(l-ja)<Pa?(n.point(e,r=(r+a)/2>0?Oa:-Oa),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),n.point(i,r),t=0):u!==o&&l>=ja&&(Ma(e-u)<Pa&&(e-=u*Pa),Ma(i-o)<Pa&&(i-=o*Pa),r=Ft(e,r,i,a),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(o,r),t=0),n.point(e=i,r=a),u=o},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var u,i,a=Math.sin(n-e);return Ma(a)>Pa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*a)):(t+r)/2}function Ht(n,t,e,r){var u;if(null==n)u=e*Oa,r.point(-ja,u),r.point(0,u),r.point(ja,u),r.point(ja,0),r.point(ja,-u),r.point(0,-u),r.point(-ja,-u),r.point(-ja,0),r.point(-ja,u);else if(Ma(n[0]-t[0])>Pa){var i=n[0]<t[0]?ja:-ja;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,a=0;ko.reset();for(var o=0,l=t.length;l>o;++o){var c=t[o],s=c.length;if(s)for(var f=c[0],h=f[0],g=f[1]/2+ja/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=c[d];var m=n[0],y=n[1]/2+ja/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>ja,k=p*M;if(ko.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Fa:b,S^h>=e^m>=e){var N=yt(dt(f),dt(n));bt(N);var E=yt(u,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(a+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Pa>i||Pa>i&&0>ko)^1&a}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=a?v?0:u(f,h):v?u(f+(0>f?ja:-ja),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(g=r(e,p),(wt(e,g)||wt(p,g))&&(p[0]+=Pa,p[1]+=Pa,v=t(p[0],p[1]))),v!==l)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(o&&e&&a^v){var m;d&i||!(m=r(p,e,!0))||(s=0,a?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&wt(e,p)||n.point(p[0],p[1]),e=p,l=v,i=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),u=dt(t),a=[1,0,0],o=yt(r,u),l=mt(o,o),c=o[0],s=l-c*c;if(!s)return!e&&n;var f=i*l/s,h=-i*c/s,g=yt(a,o),p=xt(a,f),v=xt(o,h);Mt(p,v);var d=g,m=mt(p,d),y=mt(d,d),M=m*m-y*(mt(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-m-x)/y);if(Mt(b,p),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=Ma(E-ja)<Pa,C=A||Pa>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(Ma(b[0]-w)<Pa?k:N):k<=b[1]&&b[1]<=N:E>ja^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-m+x)/y);return Mt(z,p),[b,_t(z)]}}}function u(t,e){var r=a?n:ja-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),a=i>0,o=Ma(i)>Pa,l=ve(n,6*Ia);return Rt(t,e,l,a?[0,-n]:[-ja,n-ja])}function Yt(n,t,e,r){return function(u){var i,a=u.a,o=u.b,l=a.x,c=a.y,s=o.x,f=o.y,h=0,g=1,p=s-l,v=f-c;if(i=n-l,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-l,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-c,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-c,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:l+h*p,y:c+h*v}),1>g&&(u.b={x:l+g*p,y:c+g*v}),u}}}}}}function Zt(n,t,e,r){function u(r,u){return Ma(r[0]-n)<Pa?u>0?0:3:Ma(r[0]-e)<Pa?u>0?2:1:Ma(r[1]-t)<Pa?u>0?1:0:u>0?3:2}function i(n,t){return a(n.x,t.x)}function a(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(o){function l(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,a=1,o=d[u],l=o.length,c=o[0];l>a;++a)i=o[a],c[1]<=r?i[1]>r&&Q(c,i,n)>0&&++t:i[1]<=r&&Q(c,i,n)<0&&--t,c=i;return 0!==t}function c(i,o,l,c){var s=0,f=0;if(null==i||(s=u(i,l))!==(f=u(o,l))||a(i,o)<0^l>0){do c.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+l+4)%4)!==f)}else c.point(o[0],o[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&o.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=NaN}function g(){v&&(p(y,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=f,w&&o.lineEnd()}function p(n,t){n=Math.max(-Ho,Math.min(Ho,n)),t=Math.max(-Ho,Math.min(Ho,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(o.lineStart(),o.point(n,t));else if(e&&w)o.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),k=!1):e&&(o.lineStart(),o.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,N=o,E=Pt(),A=Yt(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){o=E,v=[],d=[],k=!0},polygonEnd:function(){o=N,v=oa.merge(v);var t=l([n,r]),e=k&&t,u=v.length;(e||u)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),u&&Lt(v,i,t,c,o),o.polygonEnd()),v=d=m=null}};return C}}function Vt(n){var t=0,e=ja/3,r=oe(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*ja/180,e=n[1]*ja/180):[t/ja*180,e/ja*180]},u}function Xt(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),a-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),a=Math.sqrt(i)/u;return e.invert=function(n,t){var e=a-t;return[Math.atan2(n,e)/u,tn((i-(n*n+e*e)*u*u)/(2*u))]},e}function $t(){function n(n,t){Io+=u*n-r*t,r=n,u=t}var t,e,r,u;$o.point=function(i,a){$o.point=n,t=r=i,e=u=a},$o.lineEnd=function(){n(t,e)}}function Bt(n,t){Yo>n&&(Yo=n),n>Vo&&(Vo=n),Zo>t&&(Zo=t),t>Xo&&(Xo=t)}function Wt(){function n(n,t){a.push("M",n,",",t,i)}function t(n,t){a.push("M",n,",",t),o.point=e}function e(n,t){a.push("L",n,",",t)}function r(){o.point=n}function u(){a.push("Z")}var i=Jt(4.5),a=[],o={point:n,lineStart:function(){o.point=t},lineEnd:r,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=r,o.point=n},pointRadius:function(n){return i=Jt(n),o},result:function(){if(a.length){var n=a.join("");return a=[],n}}};return o}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Co+=n,zo+=t,++Lo}function Kt(){function n(n,r){var u=n-t,i=r-e,a=Math.sqrt(u*u+i*i);qo+=a*(t+n)/2,To+=a*(e+r)/2,Ro+=a,Gt(t=n,e=r)}var t,e;Wo.point=function(r,u){Wo.point=n,Gt(t=r,e=u)}}function Qt(){Wo.point=Gt}function ne(){function n(n,t){var e=n-r,i=t-u,a=Math.sqrt(e*e+i*i);qo+=a*(r+n)/2,To+=a*(u+t)/2,Ro+=a,a=u*n-r*t,Do+=a*(r+n),Po+=a*(u+t),Uo+=3*a,Gt(r=n,u=t)}var t,e,r,u;Wo.point=function(i,a){Wo.point=n,Gt(t=r=i,e=u=a)},Wo.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+a,e),n.arc(t,e,a,0,Fa)}function e(t,e){n.moveTo(t,e),o.point=r}function r(t,e){n.lineTo(t,e)}function u(){o.point=t}function i(){n.closePath()}var a=4.5,o={point:t,lineStart:function(){o.point=e},lineEnd:u,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=u,o.point=t},pointRadius:function(n){return a=n,o},result:b};return o}function ee(n){function t(n){return(o?r:e)(n)}function e(t){return ie(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=i,t.lineStart()}function i(e,r){var i=dt([e,r]),a=n(e,r);u(M,x,y,b,_,w,M=a[0],x=a[1],y=e,b=i[0],_=i[1],w=i[2],o,t),t.point(M,x)}function a(){S.point=e,t.lineEnd()}function l(){\nr(),S.point=c,S.lineEnd=s}function c(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,o,t),S.lineEnd=a,a()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,o,l,c,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=o+g,_=l+p,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=Ma(Ma(w)-1)<Pa||Ma(r-h)<Pa?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-y*L;(q*q/x>i||Ma((y*z+M*L)/x-.5)>.3||a>o*g+l*p+c*v)&&(u(t,e,r,o,l,c,A,C,N,b/=S,_/=S,w,d,m),m.point(A,C),u(A,C,N,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,a=Math.cos(30*Ia),o=16;return t.precision=function(n){return arguments.length?(o=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function re(n){var t=ee(function(t,e){return n([t*Ya,e*Ya])});return function(n){return le(t(n))}}function ue(n){this.stream=n}function ie(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return oe(function(){return n})()}function oe(n){function t(n){return n=o(n[0]*Ia,n[1]*Ia),[n[0]*h+l,c-n[1]*h]}function e(n){return n=o.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Ya,n[1]*Ya]}function r(){o=Ct(a=fe(m,M,x),i);var n=i(v,d);return l=g-n[0]*h,c=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,a,o,l,c,s,f=ee(function(n,t){return n=i(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Fo,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=le(b(a,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fo):It((w=+n)*Ia),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Ia,d=n[1]%360*Ia,r()):[v*Ya,d*Ya]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Ia,M=n[1]%360*Ia,x=n.length>2?n[2]%360*Ia:0,r()):[m*Ya,M*Ya,x*Ya]},oa.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function le(n){return ie(n,function(t,e){n.point(t*Ia,e*Ia)})}function ce(n,t){return[n,t]}function se(n,t){return[n>ja?n-Fa:-ja>n?n+Fa:n,t]}function fe(n,t,e){return n?t||e?Ct(ge(n),pe(t,e)):ge(n):t||e?pe(t,e):se}function he(n){return function(t,e){return t+=n,[t>ja?t-Fa:-ja>t?t+Fa:t,e]}}function ge(n){var t=he(n);return t.invert=he(-n),t}function pe(n,t){function e(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+o*u;return[Math.atan2(l*i-s*a,o*r-c*u),tn(s*i+l*a)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),a=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),o=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*i-l*a;return[Math.atan2(l*i+c*a,o*r+s*u),tn(s*r-o*u)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,a,o){var l=a*t;null!=u?(u=de(e,u),i=de(e,i),(a>0?i>u:u>i)&&(u+=a*Fa)):(u=n+a*Fa,i=n-.5*l);for(var c,s=u;a>0?s>i:i>s;s-=l)o.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pa)%(2*Math.PI)}function me(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function ye(n,t,e){var r=oa.range(n,t-Pa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),a=Math.cos(r),o=Math.sin(r),l=u*Math.cos(n),c=u*Math.sin(n),s=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+u*a*an(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*l+t*s,u=e*c+t*f,a=e*i+t*o;return[Math.atan2(u,r)*Ya,Math.atan2(a,Math.sqrt(r*r+u*u))*Ya]}:function(){return[n*Ya,t*Ya]};return p.distance=h,p}function _e(){function n(n,u){var i=Math.sin(u*=Ia),a=Math.cos(u),o=Ma((n*=Ia)-t),l=Math.cos(o);Jo+=Math.atan2(Math.sqrt((o=a*Math.sin(o))*o+(o=r*i-e*a*l)*o),e*i+r*a*l),t=n,e=i,r=a}var t,e,r;Go.point=function(u,i){t=u*Ia,e=Math.sin(i*=Ia),r=Math.cos(i),Go.point=n},Go.lineEnd=function(){Go.point=Go.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),a=Math.cos(u);return[Math.atan2(n*i,r*a),Math.asin(r&&e*i/r)]},e}function Se(n,t){function e(n,t){a>0?-Oa+Pa>t&&(t=-Oa+Pa):t>Oa-Pa&&(t=Oa-Pa);var e=a/Math.pow(u(t),i);return[e*Math.sin(i*n),a-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(ja/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),a=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=a-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(a/r,1/i))-Oa]},e):Ne}function ke(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return Ma(u)<Pa?ce:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(ja/4+t/2))]}function Ee(n){var t,e=ae(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var a=i.apply(e,arguments);if(a===e){if(t=null==n){var o=ja*r(),l=u();i([[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]])}}else t&&(a=null);return a},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(ja/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var u=n[0],i=e[0],a=t[0]-u,o=r[0]-i,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(o*(l-c)-f*(u-i))/(f*a-o*s);return[u+h*a,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),al.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,a=n.N,o=[n];je(n);for(var l=i;l.circle&&Ma(e-l.circle.x)<Pa&&Ma(r-l.circle.cy)<Pa;)i=l.P,o.unshift(l),je(l),l=i;o.unshift(l),Be(l);for(var c=a;c.circle&&Ma(e-c.circle.x)<Pa&&Ma(r-c.circle.cy)<Pa;)a=c.N,o.push(c),je(c),c=a;o.push(c),Be(c);var s,f=o.length;for(s=1;f>s;++s)c=o[s],l=o[s-1],nr(c.edge,l.site,c.site,u);l=o[0],c=o[f-1],c.edge=Ke(l.site,c.site,null,u),$e(l),$e(c)}function He(n){for(var t,e,r,u,i=n.x,a=n.y,o=al._;o;)if(r=Oe(o,a)-i,r>Pa)o=o.L;else{if(u=i-Ie(o,a),!(u>Pa)){r>-Pa?(t=o.P,e=o):u>-Pa?(t=o,e=o.N):t=e=o;break}if(!o.R){t=o;break}o=o.R}var l=Ue(n);if(al.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),al.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};nr(e.edge,c,p,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,p,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var a=n.P;if(!a)return-(1/0);e=a.site;var o=e.x,l=e.y,c=l-t;if(!c)return o;var s=o-r,f=1/i-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+u-i/2)))/f+r:(r+o)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,u,i,a,o,l,c,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=il,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(o=i.edges,l=o.length,a=0;l>a;)s=o[a].end(),r=s.x,u=s.y,c=o[++a%l].start(),t=c.x,e=c.y,(Ma(r-t)>Pa||Ma(u-e)>Pa)&&(o.splice(a,0,new tr(Qe(i.site,s,Ma(r-f)<Pa&&p-u>Pa?{x:f,y:Ma(t-f)<Pa?e:p}:Ma(u-p)<Pa&&h-r>Pa?{x:Ma(e-p)<Pa?t:h,y:p}:Ma(r-h)<Pa&&u-g>Pa?{x:h,y:Ma(t-h)<Pa?e:g}:Ma(u-g)<Pa&&r-f>Pa?{x:Ma(e-g)<Pa?t:f,y:g}:null),i.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var a=u.x,o=u.y,l=r.x-a,c=r.y-o,s=i.x-a,f=i.y-o,h=2*(l*f-c*s);if(!(h>=-Ua)){var g=l*l+c*c,p=s*s+f*f,v=(f*g-c*p)/h,d=(l*p-s*g)/h,f=d+o,m=sl.pop()||new Xe;m.arc=n,m.site=u,m.x=v+a,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=ll._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}ll.insert(y,m),y||(ol=m)}}}}function Be(n){var t=n.circle;t&&(t.P||(ol=t.N),ll.remove(t),sl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=ul,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Je(t,n)||!r(t)||Ma(t.a.x-t.b.x)<Pa&&Ma(t.a.y-t.b.y)<Pa)&&(t.a=t.b=null,e.splice(u,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,a=t[0][0],o=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(a>d||d>=o)return;if(h>p){if(i){if(i.y>=c)return}else i={x:d,y:l};e={x:d,y:c}}else{if(i){if(i.y<l)return}else i={x:d,y:c};e={x:d,y:l}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else if(v>g){if(i){if(i.x>=o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}else{if(i){if(i.x<a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}return n.a=i,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var u=new Ge(n,t);return ul.push(u),e&&nr(u,n,t,e),r&&nr(u,t,n,r),il[n.i].edges.push(new tr(u,n,t)),il[t.i].edges.push(new tr(u,t,n)),u}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,ul.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ur(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ir(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function or(n,t){var e,r,u,i=n.sort(lr).pop();for(ul=[],il=new Array(n.length),al=new er,ll=new er;;)if(u=ol,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(il[i.i]=new Ye(i),He(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Fe(u.arc)}t&&(We(t),Ze(t));var a={cells:il,edges:ul};return al=ll=ul=il=null,a}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function sr(n){return n.x}function fr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var a=.5*(e+u),o=.5*(r+i),l=t.nodes;l[0]&&gr(n,l[0],e,r,a,o),l[1]&&gr(n,l[1],a,r,u,o),l[2]&&gr(n,l[2],e,o,a,i),l[3]&&gr(n,l[3],a,o,u,i)}}function pr(n,t,e,r,u,i,a){var o,l=1/0;return function c(n,s,f,h,g){if(!(s>i||f>a||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(l>m){var y=Math.sqrt(l=m);r=t-y,u=e-y,i=t+y,a=e+y,o=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,g);break;case 3:c(n,x,b,h,g)}}}(n,r,u,i,a),o}function vr(n,t){n=oa.rgb(n),t=oa.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,a=t.g-r,o=t.b-u;return function(n){return"#"+bn(Math.round(e+i*n))+bn(Math.round(r+a*n))+bn(Math.round(u+o*n))}}function dr(n,t){var e,r={},u={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function yr(n,t){var e,r,u,i=hl.lastIndex=gl.lastIndex=0,a=-1,o=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=gl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),o[a]?o[a]+=u:o[++a]=u),(e=e[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,l.push({i:a,x:mr(e,r)})),i=gl.lastIndex;return i<t.length&&(u=t.slice(i),o[a]?o[a]+=u:o[++a]=u),o.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)o[(e=l[r]).i]=e.x(n);return o.join("")})}function Mr(n,t){for(var e,r=oa.interpolators.length;--r>=0&&!(e=oa.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],u=[],i=n.length,a=t.length,o=Math.min(n.length,t.length);for(e=0;o>e;++e)r.push(Mr(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;a>e;++e)u[e]=t[e];return function(n){for(e=0;o>e;++e)u[e]=r[e](n);return u}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Oa)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Fa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Fa/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=oa.hcl(n),t=oa.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,a=t.c-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return fn(e+i*n,r+a*n,u+o*n)+""}}function Dr(n,t){n=oa.hsl(n),t=oa.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,a=t.s-r,o=t.l-u;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return cn(e+i*n,r+a*n,u+o*n)+""}}function Pr(n,t){n=oa.lab(n),t=oa.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,a=t.a-r,o=t.b-u;return function(n){return gn(e+i*n,r+a*n,u+o*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),u=Fr(t,e),i=Hr(Or(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ya,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ya:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push("translate(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var u=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:u-4,x:mr(n[0],t[0])},{i:u-2,x:mr(n[1],t[1])})}else(1!==t[0]||1!==t[1])&&e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=oa.transform(n),t=oa.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,u=-1,i=r.length;++u<i;)e[(t=r[u]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),u=e.pop(),i=r.pop(),a=null;u===i;)a=u,u=e.pop(),i=r.pop();return a}function Qr(n){n.fixed|=2}function nu(n){n.fixed&=-7}function tu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function eu(n){n.fixed&=-5}function ru(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,a=n.nodes,o=a.length,l=-1;++l<o;)i=a[l],null!=i&&(ru(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,u+=c*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function uu(n,t){return oa.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=su,n}function iu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function au(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,a=-1;++a<u;)e.push(i[a]);for(;null!=(n=r.pop());)t(n)}function ou(n){return n.children}function lu(n){return n.value}function cu(n,t){return t.value-n.value}function su(n){return oa.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function fu(n){return n.x}function hu(n){return n.y}function gu(n,t,e){n.y0=t,n.y=e}function pu(n){return oa.range(n.length)}function vu(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function du(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function mu(n){return n.reduce(yu,0)}function yu(n,t){return n+t[1]}function Mu(n,t){return xu(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xu(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function bu(n){return[oa.min(n),oa.max(n)]}function _u(n,t){return n.value-t.value}function wu(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Su(n,t){n._pack_next=t,t._pack_prev=n}function ku(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Nu(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(c=e.length)){var e,r,u,i,a,o,l,c,s=1/0,f=-(1/0),h=1/0,g=-(1/0);if(e.forEach(Eu),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(u=e[1],u.x=u.r,u.y=0,t(u),c>2))for(i=e[2],zu(r,u,i),t(i),wu(r,i),r._pack_prev=i,wu(i,u),u=r._pack_next,a=3;c>a;a++){zu(r,u,i=e[a]);var p=0,v=1,d=1;for(o=u._pack_next;o!==u;o=o._pack_next,v++)if(ku(o,i)){p=1;break}if(1==p)for(l=r._pack_prev;l!==o._pack_prev&&!ku(l,i);l=l._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Su(r,u=o):Su(r=l,u),a--):(wu(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(a=0;c>a;a++)i=e[a],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(Au)}}function Eu(n){n._pack_next=n._pack_prev=n}function Au(n){delete n._pack_next,delete n._pack_prev}function Cu(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,a=u.length;++i<a;)Cu(u[i],t,e,r)}function zu(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var a=t.r+e.r,o=u*u+i*i;a*=a,r*=r;var l=.5+(r-a)/(2*o),c=Math.sqrt(Math.max(0,2*a*(r+o)-(r-=o)*r-a*a))/(2*o);e.x=n.x+l*u+c*i,e.y=n.y+l*i-c*u}else e.x=n.x+r,e.y=n.y}function Lu(n,t){return n.parent==t.parent?1:2}function qu(n){var t=n.children;return t.length?t[0]:n.t}function Tu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ru(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Du(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pu(n,t,e){return n.a.parent===t.parent?n.a:e}function Uu(n){return 1+oa.max(n,function(n){return n.y})}function ju(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fu(n){var t=n.children;return t&&t.length?Fu(t[0]):n}function Hu(n){var t,e=n.children;return e&&(t=e.length)?Hu(e[t-1]):n}function Ou(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Iu(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Yu(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zu(n){return n.rangeExtent?n.rangeExtent():Yu(n.range())}function Vu(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Xu(n,t){var e,r=0,u=n.length-1,i=n[r],a=n[u];return i>a&&(e=r,r=u,u=e,e=i,i=a,a=e),n[r]=t.floor(i),n[u]=t.ceil(a),n}function $u(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bu(n,t,e,r){var u=[],i=[],a=0,o=Math.min(n.length,t.length)-1;for(n[o]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<=o;)u.push(e(n[a-1],n[a])),i.push(r(t[a-1],t[a]));return function(t){var e=oa.bisect(n,t,1,o)-1;return i[e](u[e](t))}}function Wu(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Bu:Vu,l=r?Wr:Br;return a=u(n,t,l,e),o=u(t,n,l,Mr),i}function i(n){return a(n)}var a,o;return i.invert=function(n){return o(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Ur)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Qu(n,t)},i.tickFormat=function(t,e){return ni(n,t,e)},i.nice=function(t){return Gu(n,t),u()},i.copy=function(){return Wu(n,t,e,r)},u()}function Ju(n,t){return oa.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gu(n,t){return Xu(n,$u(Ku(n,t)[2])),Xu(n,$u(Ku(n,t)[2])),n}function Ku(n,t){null==t&&(t=10);var e=Yu(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Qu(n,t){return oa.range.apply(oa,Ku(n,t))}function ni(n,t,e){var r=Ku(n,t);if(e){var u=fo.exec(e);if(u.shift(),"s"===u[8]){var i=oa.formatPrefix(Math.max(Ma(r[0]),Ma(r[1])));return u[7]||(u[7]="."+ti(i.scale(r[2]))),u[8]="f",e=oa.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+ei(u[8],r)),e=u.join("")}else e=",."+ti(r[2])+"f";return oa.format(e)}function ti(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ei(n,t){var e=ti(t[2]);return n in kl?Math.abs(e-ti(Math.max(Ma(t[0]),Ma(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ri(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(u(t))}return a.invert=function(t){return i(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),a):t},a.nice=function(){var t=Xu(r.map(u),e?Math:El);return n.domain(t),r=t.map(i),a},a.ticks=function(){var n=Yu(r),a=[],o=n[0],l=n[1],c=Math.floor(u(o)),s=Math.ceil(u(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;s>c;c++)for(var h=1;f>h;h++)a.push(i(c)*h);a.push(i(c))}else for(a.push(i(c));c++<s;)for(var h=f-1;h>0;h--)a.push(i(c)*h);for(c=0;a[c]<o;c++);for(s=a.length;a[s-1]>l;s--);a=a.slice(c,s)}return a},a.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=oa.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var a=n/i(Math.round(u(n)));return t-.5>a*t&&(a*=t),r>=a?e(n):""}},a.copy=function(){return ri(n.copy(),t,e,r)},Ju(a,n)}function ui(n,t,e){function r(t){return n(u(t))}var u=ii(t),i=ii(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Qu(e,n)},r.tickFormat=function(n,t){return ni(e,n,t)},r.nice=function(n){return r.domain(Gu(e,n))},r.exponent=function(a){return arguments.length?(u=ii(t=a),i=ii(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return ui(n.copy(),t,e)},Ju(r,n)}function ii(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ai(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):NaN))-1)%i.length]}function r(t,e){return oa.range(n.length).map(function(n){return t+e*n})}var u,i,a;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new c;for(var i,a=-1,o=r.length;++a<o;)u.has(i=r[a])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,a=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+o);return i=r(l+s*o/2,s),a=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,o){arguments.length<2&&(o=0);var l=u[0],c=u[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+o)|0;return i=r(l+Math.round(s*o/2+(c-l-(n.length-1+o)*s)/2),s),a=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=(f-s)/(n.length-o+2*l);return i=r(s+h*l,h),c&&i.reverse(),a=h*(1-o),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var c=u[1]<u[0],s=u[c-0],f=u[1-c],h=Math.floor((f-s)/(n.length-o+2*l));return i=r(s+Math.round((f-s-(n.length-o)*h)/2),h),c&&i.reverse(),a=Math.round(h*(1-o)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Yu(t.a[0])},e.copy=function(){return ai(n,t)},e.domain(n)}function oi(n,t){function i(){var e=0,r=t.length;for(o=[];++e<r;)o[e-1]=oa.quantile(n,e/r);return a}function a(n){return isNaN(n=+n)?void 0:t[oa.bisect(o,n)]}var o;return a.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},a.range=function(n){return arguments.length?(t=n,i()):t},a.quantiles=function(){return o},a.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?o[e-1]:n[0],e<o.length?o[e]:n[n.length-1]]},a.copy=function(){return oi(n,t)},i()}function li(n,t,e){function r(t){return e[Math.max(0,Math.min(a,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),a=e.length-1,r}var i,a;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/i+n,[t,t+1/i]},r.copy=function(){return li(n,t,e)},u()}function ci(n,t){function e(e){return e>=e?t[oa.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ci(n,t)},e}function si(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qu(n,t)},t.tickFormat=function(t,e){return ni(n,t,e)},t.copy=function(){return si(n)},t}function fi(){return 0}function hi(n){return n.innerRadius}function gi(n){return n.outerRadius}function pi(n){return n.startAngle}function vi(n){return n.endAngle}function di(n){return n&&n.padAngle}function mi(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function yi(n,t,e,r,u){var i=n[0]-t[0],a=n[1]-t[1],o=(u?r:-r)/Math.sqrt(i*i+a*a),l=o*a,c=-o*i,s=n[0]+l,f=n[1]+c,h=t[0]+l,g=t[1]+c,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,M*M*y-x*x)),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,N=_-p,E=w-v,A=S-p,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mi(n){function t(t){function a(){c.push("M",i(n(s),o))}for(var l,c=[],s=[],f=-1,h=t.length,g=En(e),p=En(r);++f<h;)u.call(this,l=t[f],f)?s.push([+g.call(this,l,f),+p.call(this,l,f)]):s.length&&(a(),s=[]);return s.length&&a(),c.length?c.join(""):null}var e=Ce,r=ze,u=zt,i=xi,a=i.key,o=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(a="function"==typeof n?i=n:(i=Tl.get(n)||xi).key,t):a},t.tension=function(n){return arguments.length?(o=n,t):o},t}function xi(n){return n.length>1?n.join("L"):n+"Z"}function bi(n){return n.join("L")+"Z"}function _i(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function wi(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Si(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function ki(n,t){return n.length<4?xi(n):n[1]+Ai(n.slice(1,-1),Ci(n,t))}function Ni(n,t){return n.length<3?bi(n):n[0]+Ai((n.push(n[0]),n),Ci([n[n.length-2]].concat(n,[n[1]]),t))}function Ei(n,t){return n.length<3?xi(n):n[0]+Ai(n,Ci(n,t))}function Ai(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xi(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],a=t[0],o=a,l=1;if(e&&(r+="Q"+(i[0]-2*a[0]/3)+","+(i[1]-2*a[1]/3)+","+i[0]+","+i[1],u=n[1],l=2),t.length>1){o=t[1],i=n[l],l++,r+="C"+(u[0]+a[0])+","+(u[1]+a[1])+","+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=n[l],o=t[c],r+="S"+(i[0]-o[0])+","+(i[1]-o[1])+","+i[0]+","+i[1]}if(e){var s=n[l];r+="Q"+(i[0]+2*o[0]/3)+","+(i[1]+2*o[1]/3)+","+s[0]+","+s[1]}return r}function Ci(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],a=n[1],o=1,l=n.length;++o<l;)e=i,i=a,a=n[o],r.push([u*(a[0]-e[0]),u*(a[1]-e[1])]);return r}function zi(n){if(n.length<3)return xi(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],a=[u,u,u,(r=n[1])[0]],o=[i,i,i,r[1]],l=[u,",",i,"L",Ri(Pl,a),",",Ri(Pl,o)];for(n.push(n[e-1]);++t<=e;)r=n[t],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Di(l,a,o);return n.pop(),l.push("L",r),l.join("")}function Li(n){if(n.length<4)return xi(n);for(var t,e=[],r=-1,u=n.length,i=[0],a=[0];++r<3;)t=n[r],i.push(t[0]),a.push(t[1]);for(e.push(Ri(Pl,i)+","+Ri(Pl,a)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),a.shift(),a.push(t[1]),Di(e,i,a);return e.join("")}function qi(n){for(var t,e,r=-1,u=n.length,i=u+4,a=[],o=[];++r<4;)e=n[r%u],a.push(e[0]),o.push(e[1]);for(t=[Ri(Pl,a),",",Ri(Pl,o)],--r;++r<i;)e=n[r%u],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Di(t,a,o);return t.join("")}function Ti(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],a=n[0][1],o=n[e][0]-i,l=n[e][1]-a,c=-1;++c<=e;)r=n[c],u=c/e,r[0]=t*r[0]+(1-t)*(i+u*o),r[1]=t*r[1]+(1-t)*(a+u*l);return zi(n)}function Ri(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Di(n,t,e){n.push("C",Ri(Rl,t),",",Ri(Rl,e),",",Ri(Dl,t),",",Ri(Dl,e),",",Ri(Pl,t),",",Ri(Pl,e))}function Pi(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Ui(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],a=r[0]=Pi(u,i);++t<e;)r[t]=(a+(a=Pi(u=i,i=n[t+1])))/2;return r[t]=a,r}function ji(n){for(var t,e,r,u,i=[],a=Ui(n),o=-1,l=n.length-1;++o<l;)t=Pi(n[o],n[o+1]),Ma(t)<Pa?a[o]=a[o+1]=0:(e=a[o]/t,r=a[o+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),a[o]=u*e,a[o+1]=u*r));for(o=-1;++o<=l;)u=(n[Math.min(l,o+1)][0]-n[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),i.push([u||0,a[o]*u||0]);return i}function Fi(n){return n.length<3?xi(n):n[0]+Ai(n,ji(n))}function Hi(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Oa,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Oi(n){function t(t){function l(){v.push("M",o(n(m),f),s,c(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=En(e),b=En(u),_=e===r?function(){\nreturn g}:En(r),w=u===i?function(){return p}:En(i);++y<M;)a.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(l(),d=[],m=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,u=0,i=ze,a=zt,o=xi,l=o.key,c=o,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(a=n,t):a},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?o=n:(o=Tl.get(n)||xi).key,c=o.reverse||o,s=o.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Ii(n){return n.radius}function Yi(n){return[n.x,n.y]}function Zi(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Oa;return[e*Math.cos(r),e*Math.sin(r)]}}function Vi(){return 64}function Xi(){return"circle"}function $i(n){var t=Math.sqrt(n/ja);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bi(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wi(n,t,e){return Sa(n,Yl),n.namespace=t,n.id=e,n}function Ji(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,a,o){n[i][u].tween.set(t,r(e.call(n,n.__data__,a,o)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Gi(n){return null==n&&(n=""),function(){this.textContent=n}}function Ki(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qi(n,t,e,r,u){function i(n){var t=v.delay;return s.t=t+l,n>=t?a(n-t):void(s.c=a)}function a(e){var u=p.active,i=p[u];i&&(i.timer.c=null,i.timer.t=NaN,--p.count,delete p[u],i.event&&i.event.interrupt.call(n,n.__data__,i.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}s.c=o,qn(function(){return s.c&&o(e||1)&&(s.c=null,s.t=NaN),1},0,l),p.active=r,v.event&&v.event.start.call(n,n.__data__,t),g=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&g.push(r)}),h=v.ease,f=v.duration}function o(u){for(var i=u/f,a=h(i),o=g.length;o>0;)g[--o].call(n,a);return i>=1?(v.event&&v.event.end.call(n,n.__data__,t),--p.count?delete p[r]:delete n[e],1):void 0}var l,s,f,h,g,p=n[e]||(n[e]={active:0,count:0}),v=p[r];v||(l=u.time,s=qn(i,0,l),v=p[r]={tween:new c,time:l,timer:s,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++p.count)}function na(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ta(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function ea(n){return n.toISOString()}function ra(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=oa.bisect(Kl,u);return i==Kl.length?[t.year,Ku(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Kl[i-1]<Kl[i]/u?i-1:i]:[tc,Ku(n,e)[2]]}return r.invert=function(t){return ua(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(ua)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,ua(+e+1),t).length}var i=r.domain(),a=Yu(i),o=null==n?u(a,10):"number"==typeof n&&u(a,n);return o&&(n=o[0],t=o[1]),r.domain(Xu(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=ua(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=ua(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yu(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],ua(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ra(n.copy(),t,e)},Ju(r,n)}function ua(n){return new Date(n)}function ia(n){return JSON.parse(n.responseText)}function aa(n){var t=sa.createRange();return t.selectNode(sa.body),t.createContextualFragment(n.responseText)}var oa={version:"3.5.16"},la=[].slice,ca=function(n){return la.call(n)},sa=this.document;if(sa)try{ca(sa.documentElement.childNodes)[0].nodeType}catch(fa){ca=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),sa)try{sa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ha){var ga=this.Element.prototype,pa=ga.setAttribute,va=ga.setAttributeNS,da=this.CSSStyleDeclaration.prototype,ma=da.setProperty;ga.setAttribute=function(n,t){pa.call(this,n,t+"")},ga.setAttributeNS=function(n,t,e){va.call(this,n,t,e+"")},da.setProperty=function(n,t,e){ma.call(this,n,t+"",e)}}oa.ascending=e,oa.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},oa.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},oa.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},oa.extent=function(n,t){var e,r,u,i=-1,a=n.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<a;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<a;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},oa.sum=function(n,t){var e,r=0,i=n.length,a=-1;if(1===arguments.length)for(;++a<i;)u(e=+n[a])&&(r+=e);else for(;++a<i;)u(e=+t.call(n,n[a],a))&&(r+=e);return r},oa.mean=function(n,t){var e,i=0,a=n.length,o=-1,l=a;if(1===arguments.length)for(;++o<a;)u(e=r(n[o]))?i+=e:--l;else for(;++o<a;)u(e=r(t.call(n,n[o],o)))?i+=e:--l;return l?i/l:void 0},oa.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},oa.median=function(n,t){var i,a=[],o=n.length,l=-1;if(1===arguments.length)for(;++l<o;)u(i=r(n[l]))&&a.push(i);else for(;++l<o;)u(i=r(t.call(n,n[l],l)))&&a.push(i);return a.length?oa.quantile(a.sort(e),.5):void 0},oa.variance=function(n,t){var e,i,a=n.length,o=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<a;)u(e=r(n[c]))&&(i=e-o,o+=i/++s,l+=i*(e-o));else for(;++c<a;)u(e=r(t.call(n,n[c],c)))&&(i=e-o,o+=i/++s,l+=i*(e-o));return s>1?l/(s-1):void 0},oa.deviation=function(){var n=oa.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ya=i(e);oa.bisectLeft=ya.left,oa.bisect=oa.bisectRight=ya.right,oa.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},oa.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},oa.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},oa.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},oa.transpose=function(n){if(!(u=n.length))return[];for(var t=-1,e=oa.min(n,a),r=new Array(e);++t<e;)for(var u,i=-1,o=r[t]=new Array(u);++i<u;)o[i]=n[i][t];return r},oa.zip=function(){return oa.transpose(arguments)},oa.keys=function(n){var t=[];for(var e in n)t.push(e);return t},oa.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},oa.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},oa.merge=function(n){for(var t,e,r,u=n.length,i=-1,a=0;++i<u;)a+=n[i].length;for(e=new Array(a);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--a]=r[t];return e};var Ma=Math.abs;oa.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=o(Ma(e)),a=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++a)>t;)u.push(r/i);else for(;(r=n+e*++a)<t;)u.push(r/i);return u},oa.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var a in n)e.set(a,n[a]);return e};var xa="__proto__",ba="\\x00";l(c,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),oa.nest=function(){function n(t,a,o){if(o>=i.length)return r?r.call(u,a):e?a.sort(e):a;for(var l,s,f,h,g=-1,p=a.length,v=i[o++],d=new c;++g<p;)(h=d.get(l=v(s=a[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,o))}):(s={},f=function(e,r){s[e]=n(t,r,o)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],a=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(oa.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return a[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},oa.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),oa.behavior={},oa.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var _a=["webkit","ms","moz","Moz","o","O"];oa.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},oa.event=null,oa.requote=function(n){return n.replace(wa,"\\\\$&")};var wa=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,Sa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ka=function(n,t){return t.querySelector(n)},Na=function(n,t){return t.querySelectorAll(n)},Ea=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ea=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ka=function(n,t){return Sizzle(n,t)[0]||null},Na=Sizzle,Ea=Sizzle.matchesSelector),oa.selection=function(){return oa.select(sa.documentElement)};var Aa=oa.selection.prototype=[];Aa.select=function(n){var t,e,r,u,i=[];n=A(n);for(var a=-1,o=this.length;++a<o;){i.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(u=r[l])?(t.push(e=n.call(u,u.__data__,l,a)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return E(i)},Aa.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var a=this[u],o=-1,l=a.length;++o<l;)(e=a[o])&&(r.push(t=ca(n.call(e,e.__data__,o,u))),t.parentNode=e);return E(r)};var Ca="http://www.w3.org/1999/xhtml",za={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};oa.ns={prefix:za,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),za.hasOwnProperty(e)?{space:za[e],local:n}:n}},Aa.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=oa.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Aa.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!q(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Aa.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Aa.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Aa.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Aa.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Aa.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Aa.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(F)},Aa.data=function(n,t){function e(n,e){var r,u,i,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new c,y=new Array(a);for(r=-1;++r<a;)(u=n[r])&&(m.has(d=t.call(u,u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d);for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,o.push(p),l.push(g),s.push(v)}var r,u,i=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++i<a;)(u=r[i])&&(n[i]=u.__data__);return n}var o=Z([]),l=E([]),s=E([]);if("function"==typeof n)for(;++i<a;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<a;)e(r=this[i],n);return l.enter=function(){return o},l.exit=function(){return s},l},Aa.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Aa.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return E(u)},Aa.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},Aa.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Aa.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Aa.call=function(n){var t=ca(arguments);return n.apply(t[0]=this,t),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},Aa.size=function(){var n=0;return Y(this,function(){++n}),n};var La=[];oa.selection.enter=Z,oa.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(n){for(var t,e,r,u,i,a=[],o=-1,l=this.length;++o<l;){r=(u=this[o]).update,a.push(t=[]),t.parentNode=u.parentNode;for(var c=-1,s=u.length;++c<s;)(i=u[c])?(t.push(r[c]=e=n.call(u.parentNode,i.__data__,c,o)),e.__data__=i.__data__):t.push(null)}return E(a)},La.insert=function(n,t){return arguments.length<2&&(t=V(this)),Aa.insert.call(this,n,t)},oa.select=function(t){var e;return"string"==typeof t?(e=[ka(t,sa)],e.parentNode=sa.documentElement):(e=[t],e.parentNode=n(t)),E([e])},oa.selectAll=function(n){var t;return"string"==typeof n?(t=ca(Na(n,sa)),t.parentNode=sa.documentElement):(t=ca(n),t.parentNode=null),E([t])},Aa.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var qa=oa.map({mouseenter:"mouseover",mouseleave:"mouseout"});sa&&qa.forEach(function(n){"on"+n in sa&&qa.remove(n)});var Ta,Ra=0;oa.mouse=function(n){return J(n,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;oa.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},oa.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(n,t,e,i,a){return function(){function o(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(m.on(i+d,null).on(a+d,null),y(p),g({type:"dragend"}))}var c,s=this,f=oa.event.target.correspondingElement||oa.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=oa.select(e(f)).on(i+d,o).on(a+d,l),y=W(f),M=t(h,v);u?(c=u.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],g({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),u=null,i=e(b,oa.mouse,t,"mousemove","mouseup"),a=e(G,oa.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},oa.rebind(n,r,"on")},oa.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ca(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Pa=1e-6,Ua=Pa*Pa,ja=Math.PI,Fa=2*ja,Ha=Fa-Pa,Oa=ja/2,Ia=ja/180,Ya=180/ja,Za=Math.SQRT2,Va=2,Xa=4;oa.interpolateZoom=function(n,t){var e,r,u=n[0],i=n[1],a=n[2],o=t[0],l=t[1],c=t[2],s=o-u,f=l-i,h=s*s+f*f;if(Ua>h)r=Math.log(c/a)/Za,e=function(n){return[u+n*s,i+n*f,a*Math.exp(Za*n*r)]};else{var g=Math.sqrt(h),p=(c*c-a*a+Xa*h)/(2*a*Va*g),v=(c*c-a*a-Xa*h)/(2*c*Va*g),d=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-d)/Za,e=function(n){var t=n*r,e=rn(d),o=a/(Va*g)*(e*un(Za*t+d)-en(d));return[u+o*s,i+o*f,a*e/rn(Za*t+d)]}}return e.duration=1e3*r,e},oa.behavior.zoom=function(){function n(n){n.on(L,f).on(Ba+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(A[0],Math.min(A[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function a(t,e,r,a){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,a)),i(d=e,r),t=oa.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function o(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||(n({type:"zoomend"}),d=null)}function f(){function n(){o=1,i(oa.mouse(u),h),c(a)}function r(){f.on(q,null).on(T,null),g(o),s(a)}var u=this,a=D.of(u,arguments),o=0,f=oa.select(t(u)).on(q,n).on(T,r),h=e(oa.mouse(u)),g=W(u);Il.call(u),l(a)}function h(){function n(){var n=oa.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=oa.event.target;oa.select(t).on(x,r).on(b,o),_.push(t);for(var e=oa.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];a(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,a=oa.touches(p);Il.call(p);for(var o=0,l=a.length;l>o;++o,r=null)if(e=a[o],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),c(v)}function o(){if(oa.event.touches.length){for(var t=oa.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}oa.selectAll(_).on(y,null),w.on(L,f).on(R,h),N(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+oa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=oa.select(p),N=W(p);t(),l(v),w.on(L,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(Il.call(this),v=e(d=m||oa.mouse(this)),l(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*$a())*k.k),i(d,v),c(n)}function p(){var n=oa.mouse(this),t=Math.log(k.k)/Math.LN2;a(this,n,e(n),oa.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Wa,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Ba||(Ba="onwheel"in sa?($a=function(){return-oa.event.deltaY*(oa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in sa?($a=function(){return oa.event.wheelDelta},"mousewheel"):($a=function(){return-oa.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?oa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=d?d[0]:e/2,i=d?d[1]:r/2,a=oa.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=a(t),o=e/r[2];this.__chart__=k={x:u-r[0]*o,y:i-r[1]*o,k:o},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},u(+t),o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Wa:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},oa.rebind(n,D,"on")};var $a,Ba,Wa=[0,1/0];oa.color=on,on.prototype.toString=function(){return this.rgb()+""},oa.hsl=ln;var Ja=ln.prototype=new on;Ja.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Ja.rgb=function(){return cn(this.h,this.s,this.l)},oa.hcl=sn;var Ga=sn.prototype=new on;Ga.brighter=function(n){return new sn(this.h,this.c,Math.min(100,this.l+Ka*(arguments.length?n:1)))},Ga.darker=function(n){return new sn(this.h,this.c,Math.max(0,this.l-Ka*(arguments.length?n:1)))},Ga.rgb=function(){return fn(this.h,this.c,this.l).rgb()},oa.lab=hn;var Ka=18,Qa=.95047,no=1,to=1.08883,eo=hn.prototype=new on;eo.brighter=function(n){return new hn(Math.min(100,this.l+Ka*(arguments.length?n:1)),this.a,this.b)},eo.darker=function(n){return new hn(Math.max(0,this.l-Ka*(arguments.length?n:1)),this.a,this.b)},eo.rgb=function(){return gn(this.l,this.a,this.b)},oa.rgb=yn;var ro=yn.prototype=new on;ro.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new yn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new yn(u,u,u)},ro.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new yn(n*this.r,n*this.g,n*this.b)},ro.hsl=function(){return wn(this.r,this.g,this.b)},ro.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var uo=oa.map({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,rebeccapurple:6697881,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});uo.forEach(function(n,t){uo.set(n,Mn(t))}),oa.functor=En,oa.xhr=An(y),oa.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var a=Cn(n,t,null==e?r:u(e),i);return a.row=function(n){return arguments.length?a.response(null==(e=n)?r:u(n)):e},a}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(a).join(n)}function a(n){return o.test(n)?\'"\'+n.replace(/\\"/g,\'""\')+\'"\':n}var o=new RegExp(\'["\'+n+"\\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=c)return a;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,\'"\')}for(;c>s;){var r=n.charCodeAt(s++),o=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++o);else if(r!==l)continue;return n.slice(t,s-o)}return n.slice(t)}for(var r,u,i={},a={},o=[],c=n.length,s=0,f=0;(r=e())!==a;){for(var h=[];r!==i&&r!==a;)h.push(r),r=e();t&&null==(h=t(h,f++))||o.push(h)}return o},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(a).join(n)].concat(t.map(function(t){return u.map(function(n){return a(t[n])}).join(n)})).join("\\n")},e.formatRows=function(n){return n.map(i).join("\\n")},e},oa.csv=oa.dsv(",","text/csv"),oa.tsv=oa.dsv("     ","text/tab-separated-values");var io,ao,oo,lo,co=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};oa.timer=function(){qn.apply(this,arguments)},oa.timer.flush=function(){Rn(),Dn()},oa.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var so=["y","z","a","f","p","n","\\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);oa.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=oa.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),so[8+e/3]};var fo=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,ho=oa.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=oa.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),go=oa.time={},po=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vo.setUTCDate.apply(this._,arguments)},setDay:function(){vo.setUTCDay.apply(this._,arguments)},setFullYear:function(){vo.setUTCFullYear.apply(this._,arguments)},setHours:function(){vo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vo.setUTCSeconds.apply(this._,arguments)},setTime:function(){vo.setTime.apply(this._,arguments)}};var vo=Date.prototype;go.year=On(function(n){return n=go.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),go.years=go.year.range,go.years.utc=go.year.utc.range,go.day=On(function(n){var t=new po(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),go.days=go.day.range,go.days.utc=go.day.utc.range,go.dayOfYear=function(n){var t=go.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=go[n]=On(function(n){return(n=go.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});go[n+"s"]=e.range,go[n+"s"].utc=e.utc.range,go[n+"OfYear"]=function(n){var e=go.year(n).getDay();return Math.floor((go.dayOfYear(n)+(e+t)%7)/7)}}),go.week=go.sunday,go.weeks=go.sunday.range,go.weeks.utc=go.sunday.utc.range,go.weekOfYear=go.sundayOfYear;var mo={"-":"",_:" ",0:"0"},yo=/^\\s*\\d+/,Mo=/^%/;oa.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xo=oa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],\nshortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});oa.format=xo.numberFormat,oa.geo={},st.prototype={s:0,t:0,add:function(n){ft(n,this.t,bo),ft(bo.s,this.s,this),this.s?this.t+=bo.t:this.s=bo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bo=new st;oa.geo.stream=function(n,t){n&&_o.hasOwnProperty(n.type)?_o[n.type](n,t):ht(n,t)};var _o={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ht(e[r].geometry,t)}},wo={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)gt(e[r],t,0)},Polygon:function(n,t){pt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)pt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ht(e[r],t)}};oa.geo.area=function(n){return So=0,oa.geo.stream(n,No),So};var So,ko=new st,No={sphere:function(){So+=4*ja},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ko.reset(),No.lineStart=vt},polygonEnd:function(){var n=2*ko;So+=0>n?4*ja+n:n,No.lineStart=No.lineEnd=No.point=b}};oa.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=dt([t*Ia,e*Ia]);if(m){var u=yt(m,r),i=[u[1],-u[0],0],a=yt(i,u);bt(a),a=_t(a);var l=t-p,c=l>0?1:-1,v=a[0]*Ya*c,d=Ma(l)>180;if(d^(v>c*p&&c*t>v)){var y=a[1]*Ya;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>c*p&&c*t>v)){var y=-a[1]*Ya;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?o(s,t)>o(s,h)&&(h=t):o(t,h)>o(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=Ma(r)>180?r+(r>0?360:-360):r}else v=n,d=e;No.point(n,e),t(n,e)}function i(){No.lineStart()}function a(){u(v,d),No.lineEnd(),Ma(y)>Pa&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function o(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=a,y=0,No.polygonStart()},polygonEnd:function(){No.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ko?(s=-(h=180),f=-(g=90)):y>Pa?g=90:-Pa>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],oa.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],c(e[0],u)||c(e[1],u)?(o(u[0],e[1])>o(u[0],u[1])&&(u[1]=e[1]),o(e[0],u[1])>o(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var a,e,p=-(1/0),t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(a=o(u[1],e[0]))>p&&(p=a,s=e[0],h=u[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),oa.geo.centroid=function(n){Eo=Ao=Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,jo);var t=Do,e=Po,r=Uo,u=t*t+e*e+r*r;return Ua>u&&(t=qo,e=To,r=Ro,Pa>Ao&&(t=Co,e=zo,r=Lo),u=t*t+e*e+r*r,Ua>u)?[NaN,NaN]:[Math.atan2(e,t)*Ya,tn(r/Math.sqrt(u))*Ya]};var Eo,Ao,Co,zo,Lo,qo,To,Ro,Do,Po,Uo,jo={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){jo.lineStart=At},polygonEnd:function(){jo.lineStart=Nt}},Fo=Rt(zt,jt,Ht,[-ja,-ja/2]),Ho=1e9;oa.geo.clipExtent=function(){var n,t,e,r,u,i,a={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(o){return arguments.length?(i=Zt(n=+o[0][0],t=+o[0][1],e=+o[1][0],r=+o[1][1]),u&&(u.valid=!1,u=null),a):[[n,t],[e,r]]}};return a.extent([[0,0],[960,500]])},(oa.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,oa.geo.albers=function(){return oa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},oa.geo.albersUsa=function(){function n(n){var i=n[0],a=n[1];return t=null,e(i,a),t||(r(i,a),t)||u(i,a),t}var t,e,r,u,i=oa.geo.albers(),a=oa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=oa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?a:u>=.166&&.234>u&&r>=-.214&&-.115>r?o:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=a.stream(n),r=o.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),o.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),o.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var c=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=a.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Pa,f+.12*c+Pa],[s-.214*c-Pa,f+.234*c-Pa]]).stream(l).point,u=o.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pa,f+.166*c+Pa],[s-.115*c-Pa,f+.234*c-Pa]]).stream(l).point,n},n.scale(1070)};var Oo,Io,Yo,Zo,Vo,Xo,$o={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Io=0,$o.lineStart=$t},polygonEnd:function(){$o.lineStart=$o.lineEnd=$o.point=b,Oo+=Ma(Io/2)}},Bo={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wo={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wo.lineStart=ne},polygonEnd:function(){Wo.point=Gt,Wo.lineStart=Kt,Wo.lineEnd=Qt}};oa.geo.path=function(){function n(n){return n&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),a&&a.valid||(a=u(i)),oa.geo.stream(n,a)),i.result()}function t(){return a=null,n}var e,r,u,i,a,o=4.5;return n.area=function(n){return Oo=0,oa.geo.stream(n,u($o)),Oo},n.centroid=function(n){return Co=zo=Lo=qo=To=Ro=Do=Po=Uo=0,oa.geo.stream(n,u(Wo)),Uo?[Do/Uo,Po/Uo]:Ro?[qo/Ro,To/Ro]:Lo?[Co/Lo,zo/Lo]:[NaN,NaN]},n.bounds=function(n){return Vo=Xo=-(Yo=Zo=1/0),oa.geo.stream(n,u(Bo)),[[Yo,Zo],[Vo,Xo]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||re(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Wt:new te(n),"function"!=typeof o&&i.pointRadius(o),t()):r},n.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),n):o},n.projection(oa.geo.albersUsa()).context(null)},oa.geo.transform=function(n){return{stream:function(t){var e=new ue(t);for(var r in n)e[r]=n[r];return e}}},ue.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},oa.geo.projection=ae,oa.geo.projectionMutator=oe,(oa.geo.equirectangular=function(){return ae(ce)}).raw=ce.invert=ce,oa.geo.rotation=function(n){function t(t){return t=n(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t}return n=fe(n[0]%360*Ia,n[1]*Ia,n.length>2?n[2]*Ia:0),t.invert=function(t){return t=n.invert(t[0]*Ia,t[1]*Ia),t[0]*=Ya,t[1]*=Ya,t},t},se.invert=ce,oa.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fe(-n[0]*Ia,-n[1]*Ia,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ya,n[1]*=Ya}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Ia,u*Ia),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Ia,(u=+r)*Ia),n):u},n.angle(90)},oa.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Ia,u=n[1]*Ia,i=t[1]*Ia,a=Math.sin(r),o=Math.cos(r),l=Math.sin(u),c=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*a)*e+(e=c*s-l*f*o)*e),l*s+c*f*o)},oa.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return oa.range(Math.ceil(i/d)*d,u,d).map(h).concat(oa.range(Math.ceil(c/m)*m,l,m).map(g)).concat(oa.range(Math.ceil(r/p)*p,e,p).filter(function(n){return Ma(n%d)>Pa}).map(s)).concat(oa.range(Math.ceil(o/v)*v,a,v).filter(function(n){return Ma(n%m)>Pa}).map(f))}var e,r,u,i,a,o,l,c,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(l).slice(1),h(u).reverse().slice(1),g(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],c=+t[0][1],l=+t[1][1],i>u&&(t=i,i=u,u=t),c>l&&(t=c,c=l,l=t),n.precision(y)):[[i,c],[u,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),n.precision(y)):[[r,o],[e,a]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=me(o,a,90),f=ye(r,e,y),h=me(c,l,90),g=ye(i,u,y),n):y},n.majorExtent([[-180,-90+Pa],[180,90-Pa]]).minorExtent([[-180,-80-Pa],[180,80+Pa]])},oa.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=Me,u=xe;return n.distance=function(){return oa.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},oa.geo.interpolate=function(n,t){return be(n[0]*Ia,n[1]*Ia,t[0]*Ia,t[1]*Ia)},oa.geo.length=function(n){return Jo=0,oa.geo.stream(n,Go),Jo};var Jo,Go={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ko=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(oa.geo.azimuthalEqualArea=function(){return ae(Ko)}).raw=Ko;var Qo=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(oa.geo.azimuthalEquidistant=function(){return ae(Qo)}).raw=Qo,(oa.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(oa.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(oa.geo.gnomonic=function(){return ae(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Oa]},(oa.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(oa.geo.orthographic=function(){return ae(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(oa.geo.stereographic=function(){return ae(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Oa]},(oa.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,oa.geom={},oa.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=En(e),i=En(r),a=n.length,o=[],l=[];for(t=0;a>t;t++)o.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(o.sort(qe),t=0;a>t;t++)l.push([o[t][0],-o[t][1]]);var c=Le(o),s=Le(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],g=[];for(t=c.length-1;t>=0;--t)g.push(n[o[c[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[o[s[t]][2]]);return g}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},oa.geom.polygon=function(n){return Sa(n,rl),n};var rl=oa.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},rl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,a=0,o=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=o,o=this[r],e=t[0]*o[1]-o[0]*t[1],i+=(t[0]+o[0])*e,a+=(t[1]+o[1])*e;return[i*n,a*n]},rl.clip=function(n){for(var t,e,r,u,i,a,o=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,u=this[l],i=t[(r=t.length-o)-1],e=-1;++e<r;)a=t[e],Te(a,s,u)?(Te(i,s,u)||n.push(Re(i,a,s,u)),n.push(a)):Te(i,s,u)&&n.push(Re(i,a,s,u)),i=a;o&&n.push(n[0]),s=u}return n};var ul,il,al,ol,ll,cl=[],sl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,a=n.R;if(e=i?a?ar(a):i:a,u?u.L===n?u.L=e:u.R=e:this._=e,i&&a?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==a?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=a,a.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ur(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ir(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ur(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ir(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ur(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ir(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},oa.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=o[0][0],u=o[0][1],i=o[1][0],a=o[1][1];return or(e(n),o).cells.forEach(function(e,o){var l=e.edges,c=e.site,s=t[o]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=u&&c.y<=a?[[r,a],[i,a],[i,u],[r,u]]:[];s.point=n[o]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Pa)*Pa,y:Math.round(a(n,t)/Pa)*Pa,i:t}})}var r=Ce,u=ze,i=r,a=u,o=fl;return n?t(n):(t.links=function(n){return or(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return or(e(n)).cells.forEach(function(e,r){for(var u,i,a=e.site,o=e.edges.sort(Ve),l=-1,c=o.length,s=o[c-1].edge,f=s.l===a?s.r:s.l;++l<c;)u=s,i=f,s=o[l].edge,f=s.l===a?s.r:s.l,r<i.i&&r<f.i&&cr(a,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=En(r=n),t):r},t.y=function(n){return arguments.length?(a=En(u=n),t):u},t.clipExtent=function(n){return arguments.length?(o=null==n?fl:n,t):o===fl?null:o},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):o===fl?null:o&&o[1]},t)};var fl=[[-1e6,-1e6],[1e6,1e6]];oa.geom.delaunay=function(n){return oa.geom.voronoi().triangles(n)},oa.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,a,o){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(Ma(l-e)+Ma(s-r)<.01)c(n,t,e,r,u,i,a,o);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,u,i,a,o),c(n,t,e,r,u,i,a,o)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,u,i,a,o)}function c(n,t,e,r,u,a,o,l){var c=.5*(u+o),s=.5*(a+l),f=e>=c,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=hr()),f?u=c:o=c,h?a=s:l=s,i(n,t,e,r,u,a,o,l)}var s,f,h,g,p,v,d,m,y,M=En(o),x=En(l);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,a)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=hr();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){gr(n,k,v,d,m,y)},k.find=function(n){return pr(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var a,o=Ce,l=ze;return(a=arguments.length)?(o=sr,l=fr,3===a&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(o=n,i):o},i.y=function(n){return arguments.length?(l=n,i):l},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},oa.interpolateRgb=vr,oa.interpolateObject=dr,oa.interpolateNumber=mr,oa.interpolateString=yr;var hl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,gl=new RegExp(hl.source,"g");oa.interpolate=Mr,oa.interpolators=[function(n,t){var e=typeof t;return("string"===e?uo.has(t.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(t)?vr:yr:t instanceof on?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:mr)(n,t)}],oa.interpolateArray=xr;var pl=function(){return y},vl=oa.map({linear:pl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=oa.map({"in":y,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});oa.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||pl,r=dl.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},oa.interpolateHcl=Rr,oa.interpolateHsl=Dr,oa.interpolateLab=Pr,oa.interpolateRound=Ur,oa.transform=function(n){var t=sa.createElementNS(oa.ns.prefix.svg,"g");return(oa.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:ml)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};oa.interpolateTransform=$r,oa.layout={},oa.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},oa.layout.chord=function(){function n(){var n,c,f,h,g,p={},v=[],d=oa.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(c=0,g=-1;++g<i;)c+=u[h][g];v.push(c),m.push(oa.range(i)),n+=c}for(a&&d.sort(function(n,t){return a(v[n],v[t])}),o&&m.forEach(function(n,t){n.sort(function(n,e){return o(u[t][n],u[t][e])})}),n=(Fa-s*i)/n,c=0,h=-1;++h<i;){for(f=c,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=c,_=c+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:c,value:v[y]},c+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,a,o,l,c={},s=0;return c.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,c):u},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(a=n,e=r=null,c):a},c.sortSubgroups=function(n){return arguments.length?(o=n,e=null,c):o},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},oa.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,a=t.cy-n.y,o=u-e,l=i*i+a*a;if(l>o*o/m){if(v>l){var c=t.charge/l;n.px-=i*c,n.py-=a*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=i*c,n.py-=a*c}}return!t.charge}}function t(n){n.px=oa.event.x,n.py=oa.event.y,l.resume()}var e,r,u,i,a,o,l={},c=oa.dispatch("start","tick","end"),s=[1,1],f=.9,h=yl,g=Ml,p=-30,v=xl,d=.1,m=.64,M=[],x=[];return l.tick=function(){if((u*=.99)<.005)return e=null,c.end({type:"end",alpha:u=0}),!0;var t,r,l,h,g,v,m,y,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,g=l.target,y=g.x-h.x,b=g.y-h.y,(v=y*y+b*b)&&(v=u*a[r]*((v=Math.sqrt(v))-i[r])/v,y*=v,b*=v,g.x-=y*(m=h.weight+g.weight?h.weight/(h.weight+g.weight):.5),g.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=u*d)&&(y=s[0]/2,b=s[1]/2,r=-1,m))for(;++r<_;)l=M[r],l.x+=(y-l.x)*m,l.y+=(b-l.y)*m;if(p)for(ru(t=oa.geom.quadtree(M),u,o),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:u})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(m=n*n,l):Math.sqrt(m)},l.alpha=function(n){return arguments.length?(n=+n,u?n>0?u=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:u=0})):n>0&&(c.start({type:"start",alpha:u=n}),e=qn(l.tick)),l):u},l.start=function(){function n(n,r){if(!e){for(e=new Array(u),l=0;u>l;++l)e[l]=[];for(l=0;c>l;++l){var i=x[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[t],l=-1,s=o.length;++l<s;)if(!isNaN(a=o[l][n]))return a;return Math.random()*r}var t,e,r,u=M.length,c=x.length,f=s[0],v=s[1];for(t=0;u>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;u>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(t=0;c>t;++t)i[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)i[t]=h;if(a=[],"function"==typeof g)for(t=0;c>t;++t)a[t]=+g.call(this,x[t],t);else for(t=0;c>t;++t)a[t]=g;if(o=[],"function"==typeof p)for(t=0;u>t;++t)o[t]=+p.call(this,M[t],t);else for(t=0;u>t;++t)o[t]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=oa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",nu)),arguments.length?void this.on("mouseover.force",tu).on("mouseout.force",eu).call(r):r},oa.rebind(l,c,"on")};var yl=20,Ml=1,xl=1/0;oa.layout.hierarchy=function(){function n(u){var i,a=[u],o=[];for(u.depth=0;null!=(i=a.pop());)if(o.push(i),(c=e.call(n,i,i.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)a.push(s=c[l]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return au(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),o}var t=cu,e=ou,r=lu;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(iu(t,function(n){n.children&&(n.value=0)}),au(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},oa.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(a=i.length)){var a,o,l,c=-1;for(r=t.value?r/t.value:0;++c<a;)n(o=i[c],e,l=o.value*r,u),e+=l}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var a=r.call(this,e,i);return n(a[0],0,u[0],u[1]/t(a[0])),a}var r=oa.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},uu(e,r)},oa.layout.pie=function(){function n(a){var o,l=a.length,c=a.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=oa.sum(c),v=p?(f-l*g)/p:0,d=oa.range(l),m=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(a[n],a[t])}),d.forEach(function(n){m[n]={data:a[n],value:o=c[n],startAngle:s,endAngle:s+=o*v+g,padAngle:h}}),m}var t=Number,e=bl,r=0,u=Fa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var bl={};oa.layout.stack=function(){function n(o,l){if(!(h=o.length))return o;var c=o.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),a.call(n,t,e)]})}),f=e.call(n,s,l);c=oa.permute(c,f),s=oa.permute(s,f);var h,g,p,v,d=r.call(n,s,l),m=c[0].length;for(p=0;m>p;++p)for(u.call(n,c[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,c[g][p],v+=s[g-1][p][1],s[g][p][1]);return o}var t=y,e=pu,r=vu,u=gu,i=fu,a=hu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||pu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vu,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(a=t,n):a},n.out=function(t){return arguments.length?(u=t,n):u},n};var _l=oa.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(du),i=n.map(mu),a=oa.range(r).sort(function(n,t){return u[n]-u[t]}),o=0,l=0,c=[],s=[];for(t=0;r>t;++t)e=a[t],l>o?(o+=i[e],c.push(e)):(l+=i[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return oa.range(n.length).reverse()},"default":pu}),wl=oa.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,a=[],o=0,l=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>o&&(o=r),a.push(r)}for(e=0;i>e;++e)l[e]=(o-a[e])/2;return l},wiggle:function(n){var t,e,r,u,i,a,o,l,c,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=l=c=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,o=f[e][0]-f[e-1][0];s>t;++t){for(r=0,a=(n[t][e][1]-n[t][e-1][1])/(2*o);t>r;++r)a+=(n[r][e][1]-n[r][e-1][1])/o;i+=a*n[t][e][1]}g[e]=l-=u?i/u*o:0,c>l&&(c=l)}for(e=0;h>e;++e)g[e]-=c;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,a=1/u,o=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=a}for(e=0;i>e;++e)o[e]=0;return o},zero:vu});oa.layout.histogram=function(){function n(n,i){for(var a,o,l=[],c=n.map(e,this),s=r.call(this,c,i),f=u.call(this,s,c,i),i=-1,h=c.length,g=f.length-1,p=t?1:1/h;++i<g;)a=l[i]=[],a.dx=f[i+1]-(a.x=f[i]),a.y=0;if(g>0)for(i=-1;++i<h;)o=c[i],o>=s[0]&&o<=s[1]&&(a=l[oa.bisect(f,o,1,g)-1],a.y+=p,a.push(n[i]));return l}var t=!0,e=Number,r=bu,u=Mu;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return xu(n,t)}:En(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},oa.layout.pack=function(){function n(n,i){var a=e.call(this,n,i),o=a[0],l=u[0],c=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(o.x=o.y=0,au(o,function(n){n.r=+s(n.value)}),au(o,Nu),r){var f=r*(t?1:Math.max(2*o.r/l,2*o.r/c))/2;au(o,function(n){n.r+=f}),au(o,Nu),au(o,function(n){n.r-=f})}return Cu(o,l/2,c/2,t?1:1/Math.max(2*o.r/l,2*o.r/c)),a}var t,e=oa.layout.hierarchy().sort(_u),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},uu(n,e)},oa.layout.tree=function(){function n(n,u){var s=a.call(this,n,u),f=s[0],h=t(f);if(au(h,e),h.parent.m=-h.z,iu(h,r),c)iu(f,i);else{var g=f,p=f,v=f;iu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=o(g,p)/2-g.x,m=l[0]/(p.x+o(p,g)/2+d),y=l[1]/(v.depth||1);iu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,a=0,o=i.length;o>a;++a)r.push((i[a]=u={_:i[a],parent:t,children:(u=i[a].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Du(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+o(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+o(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,a=t,l=u.parent.children[0],c=u.m,s=i.m,f=a.m,h=l.m;a=Tu(a),u=qu(u),a&&u;)l=qu(l),i=Tu(i),i.a=n,r=a.z+f-u.z-c+o(a._,u._),r>0&&(Ru(Pu(a,n,e),n,r),c+=r,s+=r),f+=a.m,c+=u.m,h+=l.m,s+=i.m;a&&!Tu(i)&&(i.t=a,i.m+=f-s),u&&!qu(l)&&(l.t=u,l.m+=c-h,e=n)}return e}function i(n){n.x*=l[0],n.y=n.depth*l[1]}var a=oa.layout.hierarchy().sort(null).value(null),o=Lu,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(o=t,n):o},n.size=function(t){return arguments.length?(c=null==(l=t)?i:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:i,n):c?l:null},uu(n,a)},oa.layout.cluster=function(){function n(n,i){var a,o=t.call(this,n,i),l=o[0],c=0;au(l,function(n){var t=n.children;t&&t.length?(n.x=ju(t),n.y=Uu(t)):(n.x=a?c+=e(n,a):0,n.y=0,a=n)});var s=Fu(l),f=Hu(l),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return au(l,u?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),o}var t=oa.layout.hierarchy().sort(null).value(null),e=Lu,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},uu(n,t)},oa.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var a,o,l,c=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?c.dx:"dice"===g?c.dy:"slice-dice"===g?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(a=h[l-1]),s.area+=a.area,"squarify"!==g||(o=r(s,v))<=p?(h.pop(),p=o):(s.area-=s.pop().area,u(s,v,c,!1),v=Math.min(c.dx,c.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,c,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,a=f(t),o=r.slice(),l=[];for(n(o,a.dx*a.dy/t.value),l.area=0;i=o.pop();)l.push(i),l.area+=i.area,null!=i.z&&(u(l,i.z?a.dx:a.dy,a,!o.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,a=-1,o=n.length;++a<o;)(e=n[a].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,a=n.length,o=e.x,c=e.y,s=t?l(n.area/t):0;\nif(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<a;)u=n[i],u.x=o,u.y=c,u.dy=s,o+=u.dx=Math.min(e.x+e.dx-o,s?l(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-o,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<a;)u=n[i],u.x=o,u.y=c,u.dx=s,c+=u.dy=Math.min(e.y+e.dy-c,s?l(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function i(r){var u=a||o(r),i=u[0];return i.x=i.y=0,i.value?(i.dx=c[0],i.dy=c[1]):i.dx=i.dy=0,a&&o.revalue(i),n([i],i.dx*i.dy/i.value),(a?e:t)(i),h&&(a=u),u}var a,o=oa.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Ou,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(c=n,i):c},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ou(t):Iu(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Iu(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ou:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(l=n?Math.round:Number,i):l!=Number},i.sticky=function(n){return arguments.length?(h=n,a=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},uu(i,o)},oa.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=oa.random.normal.apply(oa,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=oa.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},oa.scale={};var Sl={floor:y,ceil:y};oa.scale.linear=function(){return Wu([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};oa.scale.log=function(){return ri(oa.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=oa.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};oa.scale.pow=function(){return ui(oa.scale.linear(),1,[0,1])},oa.scale.sqrt=function(){return oa.scale.pow().exponent(.5)},oa.scale.ordinal=function(){return ai([],{t:"range",a:[[]]})},oa.scale.category10=function(){return oa.scale.ordinal().range(Al)},oa.scale.category20=function(){return oa.scale.ordinal().range(Cl)},oa.scale.category20b=function(){return oa.scale.ordinal().range(zl)},oa.scale.category20c=function(){return oa.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);oa.scale.quantile=function(){return oi([],[])},oa.scale.quantize=function(){return li(0,1,[0,1])},oa.scale.threshold=function(){return ci([.5],[0,1])},oa.scale.identity=function(){return si([0,1])},oa.svg={},oa.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=a.apply(this,arguments)-Oa,f=o.apply(this,arguments)-Oa,h=Math.abs(f-s),g=s>f?0:1;if(n>c&&(p=c,c=n,n=p),h>=Ha)return t(c,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,N=0,E=0,A=[];if((m=(+l.apply(this,arguments)||0)/2)&&(d=i===ql?Math.sqrt(n*n+c*c):+i.apply(this,arguments),g||(E*=-1),c&&(E=tn(d/c*Math.sin(m))),n&&(N=tn(d/n*Math.sin(m)))),c){y=c*Math.cos(s+E),M=c*Math.sin(s+E),x=c*Math.cos(f-E),b=c*Math.sin(f-E);var C=Math.abs(f-s-2*E)<=ja?0:1;if(E&&mi(y,M,x,b)===g^C){var z=(s+f)/2;y=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-N),w=n*Math.sin(f-N),S=n*Math.cos(s+N),k=n*Math.sin(s+N);var L=Math.abs(s-f+2*N)<=ja?0:1;if(N&&mi(_,w,S,k)===1-g^L){var q=(s+f)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Pa&&(p=Math.min(Math.abs(c-n)/2,+u.apply(this,arguments)))>.001){v=c>n^g?0:1;var T=p,R=p;if(ja>h){var D=null==S?[_,w]:null==x?[y,M]:Re([y,M],[S,k],[x,b],[_,w]),P=y-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(p,(n-O)/(H-1)),T=Math.min(p,(c-O)/(H+1))}if(null!=x){var I=yi(null==S?[_,w]:[S,k],[y,M],c,T,g),Y=yi([x,b],[_,w],c,T,g);p===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-g^mi(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",y,",",M);if(null!=S){var Z=yi([y,M],[S,k],n,-R,g),V=yi([_,w],null==x?[y,M]:[x,b],n,-R,g);p===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^mi(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",y,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",g," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-g," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hi,r=gi,u=fi,i=ql,a=pi,o=vi,l=di;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=En(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==ql?ql:En(t),n):i},n.startAngle=function(t){return arguments.length?(a=En(t),n):a},n.endAngle=function(t){return arguments.length?(o=En(t),n):o},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Oa;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";oa.svg.line=function(){return Mi(y)};var Tl=oa.map({linear:xi,"linear-closed":bi,step:_i,"step-before":wi,"step-after":Si,basis:zi,"basis-open":Li,"basis-closed":qi,bundle:Ti,cardinal:Ei,"cardinal-open":ki,"cardinal-closed":Ni,monotone:Fi});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];oa.svg.line.radial=function(){var n=Mi(Hi);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wi.reverse=Si,Si.reverse=wi,oa.svg.area=function(){return Oi(y)},oa.svg.area.radial=function(){var n=Oi(Hi);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},oa.svg.chord=function(){function n(n,o){var l=t(this,i,n,o),c=t(this,a,n,o);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?u(l.r,l.p1,l.r,l.p0):u(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+u(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=o.call(n,u,r),a=l.call(n,u,r)-Oa,s=c.call(n,u,r)-Oa;return{r:i,a0:a,a1:s,p0:[i*Math.cos(a),i*Math.sin(a)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>ja)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=Me,a=xe,o=Ii,l=pi,c=vi;return n.radius=function(t){return arguments.length?(o=En(t),n):o},n.source=function(t){return arguments.length?(i=En(t),n):i},n.target=function(t){return arguments.length?(a=En(t),n):a},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},oa.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),a=e.call(this,n,u),o=(i.y+a.y)/2,l=[i,{x:i.x,y:o},{x:a.x,y:o},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yi;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},oa.svg.diagonal.radial=function(){var n=oa.svg.diagonal(),t=Yi,e=n.projection;return n.projection=function(n){return arguments.length?e(Zi(t=n)):t},n},oa.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$i)(e.call(this,n,r))}var t=Xi,e=Vi;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=oa.map({circle:$i,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});oa.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Ia);Aa.transition=function(n){for(var t,e,r=Hl||++Zl,u=Ki(n),i=[],a=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},o=-1,l=this.length;++o<l;){i.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(e=c[s])&&Qi(e,s,u,r,a),t.push(e)}return Wi(i,u,r)},Aa.interrupt=function(n){return this.each(null==n?Il:Bi(Ki(n)))};var Hl,Ol,Il=Bi(Ki()),Yl=[],Zl=0;Yl.call=Aa.call,Yl.empty=Aa.empty,Yl.node=Aa.node,Yl.size=Aa.size,oa.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:oa.selection().transition(n)},oa.transition.prototype=Yl,Yl.select=function(n){var t,e,r,u=this.id,i=this.namespace,a=[];n=A(n);for(var o=-1,l=this.length;++o<l;){a.push(t=[]);for(var c=this[o],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),Qi(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Wi(a,i,u)},Yl.selectAll=function(n){var t,e,r,u,i,a=this.id,o=this.namespace,l=[];n=C(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[o][a],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&Qi(u,p,o,a,i),t.push(u)}return Wi(l,o,a)},Yl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,a=this.length;a>i;i++){u.push(t=[]);for(var e=this[i],o=0,l=e.length;l>o;o++)(r=e[o])&&n.call(r,r.__data__,o,i)&&t.push(r)}return Wi(u,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(o);return e!==n&&(t=a(e,n),function(n){this.setAttribute(o,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(o.space,o.local);return e!==n&&(t=a(e,n),function(n){this.setAttributeNS(o.space,o.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var a="transform"==n?$r:Mr,o=oa.ns.qualify(n);return Ji(this,"attr."+n,t,o.local?i:u)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=oa.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Yl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=Mr(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof n){2>a&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ji(this,"style."+n,e,i)},Yl.styleTween=function(n,e,r){function u(u,i){var a=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return a&&function(t){this.style.setProperty(n,a(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Yl.text=function(n){return Ji(this,"text",n,Gi)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=oa.ease.apply(oa,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Ol,i=Hl;try{Hl=e,Y(this,function(t,u,i){Ol=t[r][e],n.call(t,t.__data__,u,i)})}finally{Ol=u,Hl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=oa.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,u=this.id,i=++Zl,a=this.namespace,o=[],l=0,c=this.length;c>l;l++){o.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[a][u],Qi(e,s,a,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wi(o,a,i)},oa.svg.axis=function(){function n(n){n.each(function(){var n,c=oa.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,o):f.domain():l,g=null==t?f.tickFormat?f.tickFormat.apply(f,o):y:t,p=c.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Pa),d=oa.transition(p.exit()).style("opacity",Pa).remove(),m=oa.transition(p.order()).style("opacity",1),M=Math.max(u,0)+a,x=Zu(f),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),oa.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=m.select("line"),C=p.select("text").text(g),z=v.select("text"),L=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=na,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*i+"V0H"+x[1]+"V"+q*i)):(n=ta,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*i+","+x[0]+"H0V"+x[1]+"H"+q*i)),E.attr(N,q*u),z.attr(k,q*M),A.attr(S,0).attr(N,q*u),L.attr(w,0).attr(k,q*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=oa.scale.linear(),r=Vl,u=6,i=6,a=3,o=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(o=ca(arguments),n):o},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(a=+t,n):a},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};oa.svg.brush=function(){function n(t){t.each(function(){var t=oa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=t.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=t.selectAll(".resize").data(v,y);o.exit().remove(),o.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),o.style("display",n.empty()?"none":null);var l,f=oa.transition(t),h=oa.transition(a);c&&(l=Zu(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zu(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==oa.event.keyCode&&(C||(M=null,L[0]-=f[1],L[1]-=h[1],C=2),S())}function v(){32==oa.event.keyCode&&2==C&&(L[0]+=f[1],L[1]+=h[1],C=0,S())}function d(){var n=oa.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(oa.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&m(n,c,0)&&(r(k),t=!0),A&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Zu(t),l=i[0],c=i[1],s=L[e],v=e?h:f,d=v[1]-v[0];return C&&(l-=s,c-=d+s),r=(e?p:g)?Math.max(l,Math.min(c,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?o=null:a=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),oa.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=oa.select(oa.event.target),w=l.of(b,arguments),k=oa.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=_.classed("extent"),z=W(b),L=oa.mouse(b),q=oa.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(oa.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",y):q.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[f[1-T]-L[0],h[1-R]-L[1]],L[0]=f[T],L[1]=h[R]}else oa.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),oa.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var a,o,l=N(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:a,j:o},e=this.__chart__||t;this.__chart__=t,Hl?oa.select(this).transition().each("start.brush",function(){a=e.i,o=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,t.x),r=xr(h,t.y);return a=o=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,v=Bl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(g=!!t[0],p=!!t[1]):c?g=!!t:s&&(p=!!t),n):c&&s?[g,p]:c?g:s?p:null},n.extent=function(t){var e,r,u,i,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),a=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],c&&(u=u[1],i=i[1]),o=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(l=u,u=i,i=l),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(c&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),s&&(o?(u=o[0],i=o[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(l=u,u=i,i=l))),c&&s?[[e,u],[r,i]]:c?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],a=o=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},oa.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=go.format=xo.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ea:Gl,ea.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},ea.toString=Gl.toString,go.second=On(function(n){return new po(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),go.seconds=go.second.range,go.seconds.utc=go.second.utc.range,go.minute=On(function(n){return new po(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),go.minutes=go.minute.range,go.minutes.utc=go.minute.utc.range,go.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new po(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),go.hours=go.hour.range,go.hours.utc=go.hour.utc.range,go.month=On(function(n){return n=go.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),go.months=go.month.range,go.months.utc=go.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[go.second,1],[go.second,5],[go.second,15],[go.second,30],[go.minute,1],[go.minute,5],[go.minute,15],[go.minute,30],[go.hour,1],[go.hour,3],[go.hour,6],[go.hour,12],[go.day,1],[go.day,2],[go.week,1],[go.month,1],[go.month,3],[go.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return oa.range(Math.ceil(n/e)*e,+t,e).map(ua)},floor:y,ceil:y};Ql.year=go.year,go.scale=function(){return ra(oa.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=go.year.utc,go.scale.utc=function(){return ra(oa.scale.linear(),ec,rc)},oa.text=An(function(n){return n.responseText}),oa.json=function(n,t){return Cn(n,"application/json",ia,t)},oa.html=function(n,t){return Cn(n,"text/html",aa,t)},oa.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=oa,define(oa)):"object"==typeof module&&module.exports?module.exports=oa:this.d3=oa}();';
+},function(a,b,c){c(0)(c(5))},function(a,b){a.exports='/*! taucharts - v1.2.2 - 2017-06-01\n* https://github.com/TargetProcess/tauCharts\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */\n!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.version=b.api=b.__api__=b.Chart=b.Plot=b.GPL=void 0;var f=c(1),g=c(3),h=c(10),i=c(16),j=c(20),k=c(38),l=c(18),m=c(32),n=c(25),o=c(26),p=c(7),q=c(40),r=c(41),s=c(42),t=c(4),u=c(45),v=c(51),w=c(55),x=c(56),y=c(59),z=c(60),A=c(61),B=c(63),C=c(64),D=c(65),E=c(66),F=c(67),G=c(68),H=c(69),I=c(70),J=c(71),K=c(39),L=c(72),M=c(73),N=c(75),O=c(76),P=c(77),Q=c(78),R=c(9),S=c(8),T=c(79),U=c(2),V=d(U);c(82);var W={},X={},Y={UnitDomainPeriodGenerator:l.UnitDomainPeriodGenerator},Z={errorCodes:S.errorCodes,unitsRegistry:n.unitsRegistry,scalesRegistry:o.scalesRegistry,grammarRegistry:p.GrammarRegistry,tickFormat:m.FormatterRegistry,isChartElement:g.utils.isChartElement,d3:V["default"],utils:g.utils,svgUtils:h.utilsDraw,tickPeriod:l.UnitDomainPeriodGenerator,colorBrewers:{add:function(a,b){a in W||(W[a]=b)},get:function(a){return W[a]}},d3_animationInterceptor:R.d3_animationInterceptor,pluginsSDK:T.PluginsSDK,plugins:{add:function(a,b){if(a in X)throw new Error("Plugin is already registered.");X[a]=b},get:function(a){return X[a]||function(a){throw new Error(a+" plugin is not defined")}}},globalSettings:{animationSpeed:750,renderingTimeout:1e4,asyncRendering:!1,syncRenderingInterval:50,syncPointerEvents:!1,handleRenderingErrors:!0,experimentalShouldAnimate:function(a){var b=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);return Object.keys(b).forEach(function(a){return c.setAttribute(a,String(b[a]))}),c},c=document.createElement("div");c.style.position="absolute",c.style.visibility="hidden",document.body.appendChild(c);var d=b("svg",{width:100,height:100});c.appendChild(d);var e,f,g,h=performance.now();for(e=0,g;e<10;e++)for(f=0;f<10;f++)g=b("circle",{fill:"black",r:5,cx:10*e,cy:10*f}),d.appendChild(g);var i=performance.now()-h;return document.body.removeChild(c),a.sources["/"].data.length*i<500},defaultNiceColor:!0,defaultColorBrewer:["#fde725","#fbe723","#f8e621","#f6e620","#f4e61e","#f1e51d","#efe51c","#ece51b","#eae51a","#e7e419","#e5e419","#e2e418","#dfe318","#dde318","#dae319","#d8e219","#d5e21a","#d2e21b","#d0e11c","#cde11d","#cae11f","#c8e020","#c5e021","#c2df23","#c0df25","#bddf26","#bade28","#b8de29","#b5de2b","#b2dd2d","#b0dd2f","#addc30","#aadc32","#a8db34","#a5db36","#a2da37","#a0da39","#9dd93b","#9bd93c","#98d83e","#95d840","#93d741","#90d743","#8ed645","#8bd646","#89d548","#86d549","#84d44b","#81d34d","#7fd34e","#7cd250","#7ad151","#77d153","#75d054","#73d056","#70cf57","#6ece58","#6ccd5a","#69cd5b","#67cc5c","#65cb5e","#63cb5f","#60ca60","#5ec962","#5cc863","#5ac864","#58c765","#56c667","#54c568","#52c569","#50c46a","#4ec36b","#4cc26c","#4ac16d","#48c16e","#46c06f","#44bf70","#42be71","#40bd72","#3fbc73","#3dbc74","#3bbb75","#3aba76","#38b977","#37b878","#35b779","#34b679","#32b67a","#31b57b","#2fb47c","#2eb37c","#2db27d","#2cb17e","#2ab07f","#29af7f","#28ae80","#27ad81","#26ad81","#25ac82","#25ab82","#24aa83","#23a983","#22a884","#22a785","#21a685","#21a585","#20a486","#20a386","#1fa287","#1fa187","#1fa188","#1fa088","#1f9f88","#1f9e89","#1e9d89","#1e9c89","#1e9b8a","#1f9a8a","#1f998a","#1f988b","#1f978b","#1f968b","#1f958b","#1f948c","#20938c","#20928c","#20928c","#21918c","#21908d","#218f8d","#218e8d","#228d8d","#228c8d","#228b8d","#238a8d","#23898e","#23888e","#24878e","#24868e","#25858e","#25848e","#25838e","#26828e","#26828e","#26818e","#27808e","#277f8e","#277e8e","#287d8e","#287c8e","#297b8e","#297a8e","#29798e","#2a788e","#2a778e","#2a768e","#2b758e","#2b748e","#2c738e","#2c728e","#2c718e","#2d718e","#2d708e","#2e6f8e","#2e6e8e","#2e6d8e","#2f6c8e","#2f6b8e","#306a8e","#30698e","#31688e","#31678e","#31668e","#32658e","#32648e","#33638d","#33628d","#34618d","#34608d","#355f8d","#355e8d","#365d8d","#365c8d","#375b8d","#375a8c","#38598c","#38588c","#39568c","#39558c","#3a548c","#3a538b","#3b528b","#3b518b","#3c508b","#3c4f8a","#3d4e8a","#3d4d8a","#3e4c8a","#3e4a89","#3e4989","#3f4889","#3f4788","#404688","#404588","#414487","#414287","#424186","#424086","#423f85","#433e85","#433d84","#443b84","#443a83","#443983","#453882","#453781","#453581","#463480","#46337f","#46327e","#46307e","#472f7d","#472e7c","#472d7b","#472c7a","#472a7a","#482979","#482878","#482677","#482576","#482475","#482374","#482173","#482071","#481f70","#481d6f","#481c6e","#481b6d","#481a6c","#48186a","#481769","#481668","#481467","#471365","#471164","#471063","#470e61","#470d60","#460b5e","#460a5d","#46085c","#46075a","#450559","#450457","#440256","#440154"],defaultClassBrewer:g.utils.range(20).map(function(a){return"color20-"+(1+a)}),log:function(a,b){b=b||"INFO",Array.isArray(a)||(a=[a]),console[b.toLowerCase()].apply(console,a)},facetLabelDelimiter:" \u2192 ",excludeNull:!0,minChartWidth:300,minChartHeight:200,minFacetWidth:150,minFacetHeight:100,specEngine:[{name:"COMPACT",width:600,height:400},{name:"AUTO",width:Number.MAX_VALUE,height:Number.MAX_VALUE}],fitModel:"normal",layoutEngine:"EXTRACT",autoRatio:!0,defaultSourceMap:["https://raw.githubusercontent.com","TargetProcess/tauCharts/master/src/addons","world-countries.json"].join("/"),getAxisTickLabelSize:g.utils.memoize(f.utilsDom.getAxisTickLabelSize,function(a){return String(a).length}),getScrollbarSize:f.utilsDom.getScrollbarSize,avoidScrollAtRatio:1.5,xAxisTickLabelLimit:150,yAxisTickLabelLimit:150,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:2,xTickWidth:9,yTickWidth:9,distToXAxisLabel:10,distToYAxisLabel:10,xAxisPadding:20,yAxisPadding:20,xFontLabelDescenderLineHeight:4,xFontLabelHeight:10,yFontLabelHeight:10,xDensityPadding:2,yDensityPadding:2,"xDensityPadding:measure":8,"yDensityPadding:measure":8,utcTime:!1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto"}}};j.Plot.__api__=Z,j.Plot.globalSettings=Z.globalSettings,[["COORDS.RECT",q.Cartesian],["COORDS.MAP",s.GeoMap],["COORDS.PARALLEL",r.Parallel],["ELEMENT.GENERIC.CARTESIAN",t.GenericCartesian],["ELEMENT.POINT",u.Point,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.LINE",x.Line,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.PATH",w.Path,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.AREA",v.Area,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["ELEMENT.INTERVAL.STACKED",y.Interval,"ELEMENT.GENERIC.CARTESIAN"],["PARALLEL/ELEMENT.LINE",z.ParallelLine]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.unitsRegistry),[["identity",A.IdentityScale,function(a,b){return g.utils.defaults(a,{references:b.references,refCounter:b.refCounter})}],["color",B.ColorScale,function(a,b){return g.utils.defaults(a,{nice:b.defaultNiceColor,brewer:"measure"===a.dimType?b.defaultColorBrewer:b.defaultClassBrewer})}],["fill",J.FillScale],["size",C.SizeScale],["ordinal",D.OrdinalScale],["period",E.PeriodScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["time",F.TimeScale,function(a,b){return g.utils.defaults(a,{utcTime:b.utcTime})}],["linear",G.LinearScale],["logarithmic",H.LogarithmicScale],["value",I.ValueScale]].reduce(function(a,b){return a.reg.apply(a,e(b))},Z.scalesRegistry);var $=[function(a){return a.data?[]:["[data] must be specified"]}];Z.chartTypesRegistry=K.chartTypesRegistry.add("scatterplot",N.ChartScatterplot,$).add("line",O.ChartLine,$).add("area",P.ChartArea,$).add("stacked-area",function(a){return(0,P.ChartArea)(g.utils.defaults(a,{stack:!0}))},$).add("bar",function(a){return(0,M.ChartInterval)(g.utils.defaults(a,{flip:!1}))},$).add("horizontalBar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("horizontal-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0},a))},$).add("stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!1,stack:!0},a))},$).add("horizontal-stacked-bar",function(a){return(0,M.ChartInterval)(g.utils.defaults({flip:!0,stack:!0},a))},$).add("map",L.ChartMap,$.concat([function(a){var b=a.fill&&a.code;if(a.fill&&!b)return"[code] must be specified when using [fill]"},function(a){var b=a.latitude&&a.longitude;if((a.latitude||a.longitude)&&!b)return"[latitude] and [longitude] both must be specified"}])).add("parallel",Q.ChartParallel,$.concat([function(a){var b=a.columns&&a.columns.length>1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML=\'<svg class="graphical-report__svg">\\n            <g class="graphical-report__cell cell">\\n            <g class="x axis">\\n            <g class="tick"><text>\'+a+"</text></g>\\n            </g>\\n            </g>\\n            </svg>";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?"&nbsp;":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;f<e.length;f++){if(c=e[f],c.from>c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>=c.to&&d.from<c.from&&d.from++;if(c.from<c.to)for(b=f+1;b<e.length;b++)d=e[b],d.from>c.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length<n.length?m:n,p=j.map(function(a){return a.elements});o.forEach(function(b){var c,d=p.splice(b.from,1)[0],e=p[b.to],f=e?e[0]:null;1===b.elements.length?c=d[0]:(c=document.createDocumentFragment(),d.forEach(function(a){c.appendChild(a)})),a.insertBefore(c,f),p.splice(b.to,0,d)})}},classes:function l(){for(var l=[],a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return b.filter(function(a){return Boolean(a)}).forEach(function(a){"string"==typeof a?l.push(a):"object"===("undefined"==typeof a?"undefined":e(a))&&l.push.apply(l,Object.keys(a).filter(function(b){return Boolean(a[b])}))}),h.utils.unique(l).join(" ").trim().replace(/\\s{2,}/g," ")}};b.utilsDom=k},function(b,c){b.exports=a},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.utils=void 0;var f=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},h=c(4),i=c(2),j=d(i),k=function A(a,b,c,d){var e=d(c(a),a);return(e[b]||[]).forEach(function(a){return A(a,b,c,d)}),e},l=function B(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;d<c;d++)if(b[d][0]===a)return b[d][1]},deepCopy:function(a){if(null===a)return null;if("object"!==("undefined"==typeof a?"undefined":g(a)))return a;var b=this.getCachedResult(a);if(b)return b;for(var c=0;c<e.length;c++){var d=e[c];if(d.canCopy(a))return this.applyDeepCopier(d,a)}throw new Error("no DeepCopier is able to copy "+a)},applyDeepCopier:function(a,b){var c=a.create(b);if(this.cacheResult(b,c),this.depth++,this.depth>this.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d<b.length;d++)c.push(a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Date},create:function(a){return new Date(a)}}),d}(),p=[h.GenericCartesian],q=function(a){return/^(#|rgb\\(|rgba\\()/.test(a)},r=/(.)^/,s={"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#x27;","`":"&#x60;"},t={"\'":"\'","\\\\":"\\\\","\\r":"r","\\n":"n","\\u2028":"u2028","\\u2029":"u2029"},u=/\\\\|\'|\\r|\\n|\\u2028|\\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g<d;g++)f[g]=arguments[g];c.apply(this,f),e=!0}a.e=b,a.ts=new Date}}return function(){var e={e:b,ts:new Date},f=a.e&&a.e===e.e?e.ts-a.ts:d;if(f>=d){for(var g=arguments.length,h=Array(g),i=0;i<g;i++)h[i]=arguments[i];c.apply(this,h)}a.e=e.e,a.ts=e.ts}},splitEvenly:function(a,b){var c=a[0],d=a[1],f=(d-c)/(b-1),g=b>=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d<b;d++)c.push(d);return c},flatten:function(a){var b;return Array.isArray(a)?(b=[]).concat.apply(b,e(a.map(function(a){return z.flatten(a)}))):a},unique:function(a,b){for(var c={},d=[],e=a.length,f=b||function(a){return String(a)},g=0;g<e;++g){var h=a[g],i=f(h);c.hasOwnProperty(i)||(c[i]=!0,d.push(h))}return d},groupBy:function(a,b){return a.reduce(function(a,c){var d=b(c);return a[d]=a[d]||[],a[d].push(c),a},{})},union:function(a,b){return z.unique(a.concat(b))},intersection:function(a,b){return a.filter(function(a){return b.indexOf(a)!==-1})},defaults:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=c.length;if(0===e||!a)return a;for(var f=0;f<e;f++)for(var g=c[f],h=z.isObject(g)?Object.keys(g):[],i=h.length,j=0;j<i;j++){var k=h[j];void 0===a[k]&&(a[k]=g[k])}return a},omit:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e=Object.assign({},a);return c.forEach(function(a){delete e[a]}),e},memoize:function C(a,b){var C=function c(d){var e=c.cache,f=String(b?b.apply(this,arguments):d);return e.hasOwnProperty(f)||(e[f]=a.apply(this,arguments)),e[f]};return C.cache={},C},createMultiSorter:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a,c){var d=0;return b.every(function(b){return d=b(a,c),0===d}),d}},pick:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];var e={};return null==a?e:c.reduce(function(b,c){var d=a[c];return d&&(b[c]=d),b},{})},escape:function(a){return a=null==a?"":String(a),w.test(a)?a.replace(x,function(a){return s[a]}):a},template:function D(a,b,c){!b&&c&&(b=c),b=z.defaults({},b,y);var d=RegExp([(b.escape||r).source,(b.interpolate||r).source,(b.evaluate||r).source].join("|")+"|$","g"),e=0,f="__p+=\'";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(u,function(a){return"\\\\"+t[a]}),e=h+b.length,c?f+="\'+\\n((__t=("+c+"))==null?\'\':utils.escape(__t))+\\n\'":d?f+="\'+\\n((__t=("+d+"))==null?\'\':__t)+\\n\'":g&&(f+="\';\\n"+g+"\\n__p+=\'"),b}),f+="\';\\n",b.variable||(f="with(obj||{}){\\n"+f+"}\\n"),f="var __t,__p=\'\',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,\'\');};\\n"+f+"return __p;\\n";try{var g=new Function(b.variable||"obj",f)}catch(h){throw h.source=f,h}var D=function(a){return g.call(this,a)},i=b.variable||"obj";return D.source="function("+i+"){\\n"+f+"}",D}};b.utils=z},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function i(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GenericCartesian=void 0;var j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(5),l=c(7),m=c(9),n=c(3),o=c(2),p=d(o);b.GenericCartesian=function(a){function b(a){g(this,b);var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),c.config.guide.size=c.config.guide.size||{};var d=c.config.stack,e=c.config.guide.enableColorToBarPosition,f=[a.flip&&l.GrammarRegistry.get("flip"),d&&l.GrammarRegistry.get("stack"),e&&l.GrammarRegistry.get("positioningByColor")];return c.decorators=(c.config.transformRules||f).concat(a.transformModel||[]),c.adjusters=(c.config.adjustRules||[]).concat(a.adjustScales||[]),c}return i(b,a),j(b,[{key:"defineGrammarModel",value:function(a){var b=this,c=this.config;this.regScale("x",a("pos",c.x,[0,c.options.width])).regScale("y",a("pos",c.y,[c.options.height,0])).regScale("size",a("size",c.size,{})).regScale("color",a("color",c.color,{})).regScale("split",a("split",c.split,{})).regScale("label",a("label",c.label,{})).regScale("identity",a("identity",c.identity,{}));var d=this.getScale("x"),e=this.getScale("y"),g=this.getScale("size"),h=this.getScale("label"),i=this.getScale("color"),j=this.getScale("split"),k=this.getScale("identity"),l=e.domain(),m=e.discrete?l[0]:Math.max(0,Math.min.apply(Math,f(l))),n=e.value(m)+.5*e.stepSize(m),o=i.domain(),p="(@taucharts@)";return{data:function(){return b.data()},flip:!1,scaleX:d,scaleY:e,scaleSize:g,scaleLabel:h,scaleColor:i,scaleSplit:j,scaleIdentity:k,color:function(a){return i.value(a[i.dim])},label:function(a){return h.value(a[h.dim])},group:function(a){return""+a[i.dim]+p+a[j.dim]},order:function(a){var b=a.split(p)[0],c=o.indexOf(b);return c<0?Number.MAX_VALUE:c},size:function(a){return g.value(a[g.dim])},id:function(a){return k.value(a[k.dim],a)},xi:function(a){return d.value(a[d.dim])},yi:function(a){return e.value(a[e.dim])},y0:function(){return n}}}},{key:"getGrammarRules",value:function(){return this.decorators.filter(function(a){return a})}},{key:"getAdjustScalesRules",value:function(){return(this.adjusters||[]).filter(function(a){return a})}},{key:"createScreenModel",value:function(a){var b=a.flip,c=function(a,b,c){return a?b:c};return{flip:b,id:a.id,x:c(b,a.yi,a.xi),y:c(b,a.xi,a.yi),x0:c(b,a.y0,a.xi),y0:c(b,a.xi,a.y0),size:a.size,group:a.group,order:a.order,label:a.label,color:function(b){return a.scaleColor.toColor(a.color(b))},"class":function(b){return a.scaleColor.toClass(a.color(b))},model:a,toFibers:function(){var b=a.data(),c=n.utils.groupBy(b,a.group);return Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[])}}}},{key:"drawFrames",value:function(){var a=this,b=this.config.options,c=function(a,b){var c=Math.pow(10,b);return Math.round(c*a)/c},d=function(b){return c(a.screenModel.size(b)/2,4)},f=m.d3_animationInterceptor,g=function(b,c,d){var e=a.config.guide.animationSpeed,g=b.selectAll("."+c).data(function(a){return[a]},a.screenModel.id);g.exit().call(f(e,null,{width:0},function(a){return p["default"].select(a).remove()})),g.call(f(e,null,d)),g.enter().append("rect").style("stroke-width",0).call(f(e,{width:0},d))},h=this.config.flip,i=h?"y":"x",j=h?"x":"y",k=h?"x0":"y0",l=h?"height":"width",o=h?"width":"height",q=function(){var b,c,f;g(this,"lvl-top",(b={},e(b,l,function(a){return d(a)}),e(b,o,1),e(b,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(b,j,function(b){return a.screenModel[j](b)}),e(b,"fill",function(b){return a.screenModel.color(b)}),e(b,"class",function(b){return"lvl-top "+a.screenModel["class"](b)}),b)),g(this,"lvl-btm",(c={},e(c,l,function(a){return d(a)}),e(c,o,1),e(c,i,function(b){return a.screenModel[i](b)-d(b)/2}),e(c,j,function(b){return a.screenModel[k](b)}),e(c,"fill",function(b){return a.screenModel.color(b)}),e(c,"class",function(b){return"lvl-btm "+a.screenModel["class"](b)}),c)),g(this,"lvl-link",(f={},e(f,l,.5),e(f,o,function(b){return Math.abs(a.screenModel[j](b)-a.screenModel[k](b))}),e(f,i,function(b){return a.screenModel[i](b)-.25}),e(f,j,function(b){return Math.min(a.screenModel[j](b),a.screenModel[k](b))}),e(f,"fill",function(b){return a.screenModel.color(b)}),e(f,"class",function(b){return"lvl-link "+a.screenModel["class"](b)}),f))},r=function(){this.attr("class","frame-id-"+a.config.uid).call(function(){var b=this.selectAll(".generic").data(function(a){return a},a.screenModel.id);b.exit().remove(),b.call(q),b.enter().append("g").attr("class","generic").call(q)})},s=n.utils.groupBy(this.data(),a.screenModel.group),t=Object.keys(s).sort(function(b,c){return a.screenModel.order(b)-a.screenModel.order(c)}).reduce(function(a,b){return a.concat([s[b]])},[]),u=b.container.selectAll(".frame-id-"+a.config.uid).data(t);u.exit().remove(),u.call(r),u.enter().append("g").call(r)}}]),b}(k.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Element=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(2),l=d(k);b.Element=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.screenModel=null,c._elementNameSpace=a.namespace||"default",c._elementScalesHub={},c}return g(b,a),h(b,[{key:"regScale",value:function(a,b){return this._elementScalesHub[a]=b,this}},{key:"getScale",value:function(a){return this._elementScalesHub[a]||null}},{key:"fireNameSpaceEvent",\nvalue:function(a,b){var c=this._elementNameSpace;this.fire(a+"."+c,b)}},{key:"subscribe",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:b})}if(c=d.callbacks["*"],"function"==typeof c){if(!b)for(b=[this],e=0;e<arguments.length;e++)b.push(arguments[e]);f.unshift({fn:c,context:d.context,args:[{sender:this,type:a,args:b}]})}}f.forEach(function(a){return a.fn.apply(a.context,a.args)})},g[a]=b),b}Object.defineProperty(b,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f={},g={},h=function(){function a(){c(this,a),this.handler=null,this.emit_destroy=d("destroy")}return e(a,[{key:"addHandler",value:function(a,b){b=b||this,this.handler={callbacks:a,context:b,handler:this.handler}}},{key:"on",value:function(a,b,c){var d={};return d[a]=b,this.addHandler(d,c),d}},{key:"fire",value:function(a,b){d.call(this,a).call(this,b)}},{key:"removeHandler",value:function(a,b){var c,d=this;for(b=b||this;c=d,d=d.handler;)if(d.callbacks===a&&d.context===b)return d.callbacks=f,void(c.handler=d.handler)}},{key:"destroy",value:function(){this.emit_destroy(),this.handler=null}}]),a}();b.Emitter=h},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.GrammarRegistry=void 0;var e=c(3),f=c(8),g={},h={get:function(a){return g[a]},reg:function(a,b){return g[a]=b,this}};h.reg("identity",function(){return{}}).reg("flip",function(a){var b=a.scaleY,c=a.scaleX,e=-.5,f=c.domain(),g=c.discrete?f[0]:Math.max(0,Math.min.apply(Math,d(f))),h=c.value(g)+c.stepSize(g)*e;return{flip:!0,scaleX:b,scaleY:c,xi:function(a){return b.value(a[b.dim])},yi:function(a){return c.value(a[c.dim])},y0:function(){return h}}}).reg("positioningByColor",function(a){var b=a.scaleX.discrete?function(a){var b=a.data(),c=b.reduce(function(b,c){var d=c[a.scaleX.dim],e=c[a.scaleColor.dim];return d in b||(b[d]=[]),b[d].indexOf(e)<0&&b[d].push(e),b},{}),d=a.scaleX,e=a.scaleColor,f=e.discrete?e.domain():e.originalSeries().sort(function(a,b){return a-b}),g=f.length||1,h=function(a){return d.stepSize(a[d.dim])*(g/(1+g))};return{xi:function(b){var d=b[a.scaleX.dim],e=c[d]||[b[a.scaleColor.dim]],f=e.length,i=e.indexOf(b[a.scaleColor.dim]),j=h(b),k=j/(g+1),l=a.xi(b)-(f+1)*k/2,m=(1+i)*k;return l+m}}}:function(){return{}};return b(a)}).reg("groupOrderByAvg",function(a){var b=a.data(),c=function(b){return b.map(a.yi).reduce(function(a,b){return a+b},0)/b.length},d=b.reduce(function(b,c){var d=a.group(c);return b[d]=b[d]||[],b[d].push(c),b},{}),e=Object.keys(d).map(function(a){return[a,c(d[a])]}).sort(function(a,b){return a[1]-b[1]}).map(function(a){return a[0]});return{order:function(a){var b=e.indexOf(a);return b<0?Number.MAX_VALUE:b}}}).reg("stack",function(a){var b=a.data(),c=a.scaleX,d=a.scaleY;if(d.discrete||d.domain().some(function(a){return"number"!=typeof a}))throw new f.TauChartError("Stacked field ["+d.dim+"] should be a number",f.errorCodes.STACKED_FIELD_NOT_NUMBER,{field:d.dim});var g=function(a){return function(b){var e=b[c.dim],f=b[d.dim],g=f>=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=a<k?a:k,l=a>l?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<l)&&(b.max=l),(!a.hasOwnProperty("min")||a.min>k)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max<n?b.max:a.max):(b.fixed=!0,b.min=m,b.max=n,b.nice=!1),b}),g/(k+g+l)},k=e?1:j(a.scaleX,i.left,i.right,!1),l=f?1:j(a.scaleY,i.top,i.bottom,!0),m=Math.min(g*k,g*l),n=Math.min(h*k,h*l);return a.scaleSize.fixup(function(){return{minSize:m,maxSize:n}}),{}}),b.GrammarRegistry=h},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function e(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var f=function(a){function b(a,e,f){c(this,b);var g=d(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return g.name="TauChartError",g.message=a,g.errorCode=e,g.errorArgs=f,g}return e(b,a),b}(Error),g={STACKED_FIELD_NOT_NUMBER:"STACKED_FIELD_NOT_NUMBER",NO_DATA:"NO_DATA",NOT_SUPPORTED_TYPE_CHART:"NOT_SUPPORTED_TYPE_CHART",UNKNOWN_UNIT_TYPE:"UNKNOWN_UNIT_TYPE",INVALID_LOG_DOMAIN:"INVALID_LOG_DOMAIN"};b.TauChartError=f,b.errorCodes=g},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.cutText=b.wrapText=b.d3_selectAllImmediate=b.d3_transition=b.d3_decorator_avoidLabelsCollisions=b.d3_decorator_prettify_categorical_axis_ticks=b.d3_decorator_highlightZeroTick=b.d3_decorator_fixEdgeAxisTicksOverflow=b.d3_decorator_fixHorizontalAxisTicksOverflow=b.d3_decorator_fix_axis_start_line=b.d3_decorator_prettify_axis_label=b.d3_decorator_wrap_tick_label=b.d3_createPathTween=b.d3_animationInterceptor=void 0;var g=c(3),h=c(1),i=c(10),j=c(2),k=d(j),l=c(11),m=d(l),n=c(13),o=function(){return g.utils.memoize(function(a){return a.node().getComputedTextLength()},function(a){return a.node().textContent.length})},p=function(a,b,c){c=c||o(),a.each(function(){var a=k["default"].select(this.parentNode),d=a.data()[0],e=b(d),f=k["default"].select(this),g=f.text().split(/\\s+/),h=!1,i=g.reduce(function(a,b,d){if(h)return a;var g=d>0?[a,b].join(" "):b,i=c(f.text(g));if(i<e)a=g;else{var j=Math.floor(e/i*g.length);a=g.substr(0,j-4)+"...",h=!0}return a},"");f.text(i)})},q=function(a,b,c,d,e,f){f=f||o();var g=function(a,b,c,d,e,f,g){var h=g*c+f;return a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b)};a.each(function(){var a=k["default"].select(this.parentNode),h=a.data()[0],i=b(h),j=k["default"].select(this),l=j.text().split(/\\s+/),m=1.1,n=j.attr("x"),o=j.attr("y"),p=parseFloat(j.attr("dy"));j.text(null);var q=g(j,null,m,n,o,p,0),r=!1,s=l.length-1,t=l.reduce(function(a,b,d){if(r)return a;var e=a.length===c||d===s,g=a[a.length-1],h=""!==g?g+" "+b:b,j=f(q.text(h)),k=j>i;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" \u2192 ",l=function(a){for(var b=[],c=0;c<a.length-1;c++)b.push(a[c],k);return b.push(a[c]),b}(b.text.split(k)),m=g.selectAll("tspan").data(l);if(m.enter().append("tspan").attr("class",function(a,b){return b%2?"label-token-delimiter label-token-delimiter-"+b:"label-token label-token-"+b}).text(function(a){return a}),m.exit().remove(),["left","right"].indexOf(b.dock)>=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s<c.e;if(g||i){c.l=m(a.l,g);var j=c.textRef[0].length,k=c.textRef.text();j>1&&(k=k.replace(/([\\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c<a.length-1;c+=3)a[c-1].isCubicControl=!0,a[c].isCubicControl=!0;for(c=2;c<b.length-1;c+=3)b[c-1].isCubicControl=!0,b[c].isCubicControl=!0;a=a.filter(function(a){return!a.isInterpolated});var d,e;for(c=a.length-2;c>=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f<e,h=g?c:b,i=g?b:c,j=(d?s:r)({smallerPolyline:h,biggerPolyline:i,decreasing:g}),k=i.slice(1,i.length-1),l=j.slice(1,j.length-1);return function(a){var b=o(l,k,g?1-a:a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}var m=b.slice(1,b.length-1),n=c.slice(1,c.length-1);return function(a){var b=o(m,n,a);return b.forEach(function(a){return a.positionIsBeingChanged=!0}),b}}function i(a){var b=a.pointFrom,c=a.pointTo;return function(a){return[n(b,c,a)]}}function j(a){var b=a.polylineFrom,c=a.polylineTo;return function(a){return o(b.slice(1,3),c.slice(1,3),a)}}function k(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=0===c.length,f=e,g=e?b:c;return function(a){var b=(d?q:p)({t:a,polyline:g,decreasing:e,rightToLeft:f});return b.forEach(function(a,b){b>0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k<b.length;k++)f=b[k-1].x,g=b[k-1].y,d=b[k].x,e=b[k].y,h=Math.sqrt((d-f)*(d-f)+(e-g)*(e-g)),j+=h,i.push(j);var m=a*j;for(k=1;k<i.length;k++)if(m<=i[k]){c=Math.min(1,(k-1+(m-i[k-1])/(i[k]-i[k-1]))/(b.length-1));break}}var o=Math.floor((b.length-1)*c)+1,p=b.length-o,q=o,r=b.slice(0,o);if(c<1){var s=c*(b.length-1)%1,t=n(b[o-1],b[o],s);l(r,y.utils.range(p).map(function(a){return Object.assign({},t,{id:b[q+a].id,isInterpolated:!0})}))}return r}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function q(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=(b.length-1)/3+1,d=0;if(a>0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q<c;q++)g=b[3*q-3].x,h=b[3*q-3].y,i=b[3*q-2].x,j=b[3*q-2].y,k=b[3*q-1].x,m=b[3*q-1].y,e=b[3*q].x,f=b[3*q].y,n=(u(g,h,i,j)+u(i,j,k,m)+u(k,m,e,f)+u(e,f,g,h))/2,p+=n,o.push(p);var r=a*p;for(q=1;q<o.length;q++)if(r<=o[q]){d=Math.min(1,(q-1+(r-o[q-1])/(o[q]-o[q-1]))/(c-1));break}}var s=Math.floor((c-1)*d)+1,t=c-s,w=3*s,x=b.slice(0,3*(s-1)+1);if(d<1){var z=d*(c-1)%1,A=v(z,b.slice(3*(s-1),3*s+1)),B=A.slice(1,4);B.forEach(function(a){return a.isInterpolated=!0}),B[2].id=b[w].id,l(x,B),y.utils.range(1,t).forEach(function(a){l(x,[{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},{x:B[2].x,y:B[2].y,isCubicControl:!0,isInterpolated:!0},Object.assign({},B[2],{id:b[w+3*a].id,isInterpolated:!0})])})}return x}(d?1-b:b,f?c.slice(0).reverse():c);return f&&g.reverse(),g}function r(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=b.length-1,f=c.length-1,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=1;return i.forEach(function(a){y.utils.range(1,a).forEach(function(e){var f;e===a-1?(f=Object.assign({},b[k]),d||(f.id=c[j.length].id)):(f=n(b[k-1],b[k],e/(a-1)),f.id=c[j.length].id,d&&(f.isInterpolated=!0)),j.push(f)}),k++}),j}function s(a){var b=a.smallerPolyline,c=a.biggerPolyline,d=a.decreasing,e=(b.length-1)/3,f=(c.length-1)/3,g=Math.floor(f/e)+1,h=f%e,i=y.utils.range(e).map(function(a){return g+Number(a<h)}),j=[b[0]],k=3;return i.forEach(function(a){if(a>2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b<e.length-1&&(a.isInterpolated=!0)}),l(j,e.slice(1))}else{var f=Object.assign({},b[k-2]),g=Object.assign({},b[k-1]),h=Object.assign({},b[k]);d||(h.id=c[j.length+2].id),j.push(f,g,h)}k+=3}),j}function t(a,b){var c,d,e,f,g=[],h=[],i=0,j=a.length,k=b.length;for(c=0;c<j;c++)for(e=a[c],d=i;d<k;d++)if(f=b[d],e.id===f.id){i=d+1,g.push(e),h.push(f);break}if(g.length<1||h.length<1)return function(a){return a};var l=Object.keys(g[0]).filter(function(a){return"number"==typeof g[0][a]}).filter(function(a){return"id"!==a}),m={},n=function(a,b,c,d){return function(e){return d+(e-b)*(d-c)/(b-a)}},o=function(a,b){return function(c){return c-a+b}};return l.forEach(function(a){for(var b,c,d=g[0][a],e=h[0][a],f=g.length-1;f>0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f<a.length;f++)c=0===f?a[0]:a[f]/(1-a[f-1]),d=v(c,b),l(e,d.slice(1,4)),b=d.slice(3);return l(e,b.slice(1)),e}Object.defineProperty(b,"__esModule",{value:!0});var x=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();b["default"]=d;var y=c(3),z=c(12)},function(a,b){"use strict";function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a){return 2===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)+(arguments.length<=2?void 0:arguments[2])*a:3===(arguments.length<=1?0:arguments.length-1)?(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)+2*(arguments.length<=2?void 0:arguments[2])*(1-a)*a+(arguments.length<=3?void 0:arguments[3])*a*a:(arguments.length<=1?void 0:arguments[1])*(1-a)*(1-a)*(1-a)+3*(arguments.length<=2?void 0:arguments[2])*(1-a)*(1-a)*a+3*(arguments.length<=3?void 0:arguments[3])*(1-a)*a*a+(arguments.length<=4?void 0:arguments[4])*a*a*a}function e(a){for(var b=arguments.length,e=Array(b>1?b-1:0),f=1;f<b;f++)e[f-1]=arguments[f];var g=e.map(function(a){return a.x}),h=e.map(function(a){return a.y});return g.unshift(a),h.unshift(a),{x:d.apply(void 0,c(g)),y:d.apply(void 0,c(h))}}function f(a,b,c,d,f){var g=e(a,b,c),h=e(a,b,c,d),i=e(a,c,d,f),j=e(a,d,f),k=e(a,h,i);return[b,g,h,k,i,j,f]}Object.defineProperty(b,"__esModule",{value:!0}),b.bezier=d,b.getBezierPoint=e,b.splitCubicSegment=f},function(a,b,c){"use strict";function d(a){return h[a]||i[a]}function e(a){return void 0!==i[a]?"cubic":"polyline"}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineInterpolator=d,b.getInterpolatorSplineType=e;var f=c(14),g=c(15),h={linear:function(a){return a},step:g.getStepLine,"step-before":g.getStepBeforeLine,"step-after":g.getStepAfterLine},i={smooth:f.getCurve,"smooth-keep-extremum":f.getCurveKeepingExtremums}},function(a,b,c){"use strict";function d(a){return f(a,!1)}function e(a){return f(a,!0)}function f(a,b){if(a.length<2)return a.slice(0);if(2===a.length)return[a[0],{x:g(a[0].x,a[1].x,1/3),y:g(a[0].y,a[1].y,1/3)},{x:g(a[0].x,a[1].x,2/3),y:g(a[0].y,a[1].y,2/3)},a[1]];for(var c,d,e,f,i,j,k,l,m,n,o,p,q,r,s=new Array(3*(a.length-1)+1),t=0;t<a.length;t++)s[3*t]=a[t],t>0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;t<v.length;t+=3)c=v[t-5],d=v[t-3],e=v[t-1],(d.x-c.x)*(e.x-d.x)*1e12<1?(f=g(c.x,d.x,.5),j=g(d.x,e.x,.5),i=g(c.y,d.y,.5),k=g(d.y,e.y,.5)):(n=(d.x-c.x)/(e.x-c.x),l=(d.x-c.x*(1-n)*(1-n)-e.x*n*n)/(2*(1-n)*n),m=(d.y-c.y*(1-n)*(1-n)-e.y*n*n)/(2*(1-n)*n),f=g(c.x,l,n),j=g(l,e.x,n),i=g(c.y,m,n),k=g(m,e.y,n),b&&(p=d.x-f,\nq=j-d.x,o=(k-d.y)/q,(d.y-c.y)*(e.y-d.y)<=0?o=0:(d.y>c.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i<c.y&&(r=(d.y-c.y)/(d.y-i),p=g(p*r,p,1/(1+Math.abs(r))),o=(d.y-c.y)/p)),f=d.x-p,j=d.x+q,i=d.y-o*p,k=d.y+o*q)),s[t-4]={x:f,y:i},s[t-2]={x:j,y:k};s[1]={x:g(s[0].x,s[3].x,1/3),y:g(s[0].y,g(s[3].y,s[2].y,1.5),2/3)},u=s.length-1,s[u-1]={x:g(s[u].x,s[u-3].x,1/3),y:g(s[u].y,g(s[u-3].y,s[u-2].y,1.5),2/3)},v=s.slice(0)}return v}function g(a,b,c){return a+c*(b-a)}Object.defineProperty(b,"__esModule",{value:!0}),b.getCurve=d,b.getCurveKeepingExtremums=e;var h=c(12)},function(a,b){"use strict";function c(a){for(var b,c,d,e,f=[],g=void 0!==a[0].id,h=void 0!==a[0].size,i=1;i<a.length;i++)b=a[i-1],c=a[i],d={x:(b.x+c.x)/2,y:b.y},e={x:(b.x+c.x)/2,y:c.y},g&&(d.id=b.id+"-"+c.id+"-1",e.id=b.id+"-"+c.id+"-2"),h&&(d.size=b.size,e.size=c.size),1===i&&f.push(b),f.push(d,e,c);return f}function d(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:b.x,y:c.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=c.size),1===h&&e.push(b),e.push(d,c);return e}function e(a){for(var b,c,d,e=[],f=void 0!==a[0].id,g=void 0!==a[0].size,h=1;h<a.length;h++)b=a[h-1],c=a[h],d={x:c.x,y:b.y},f&&(d.id=b.id+"-"+c.id),g&&(d.size=b.size),1===h&&e.push(b),e.push(d,c);return e}Object.defineProperty(b,"__esModule",{value:!0}),b.getStepLine=c,b.getStepBeforeLine=d,b.getStepAfterLine=e},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GPL=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(6),j=c(3),k=c(17),l=c(19),m=function(a){return j.utils.isDate(a)?a.getTime():a},n=function(a){var b=this;Object.keys(a).forEach(function(c){return b[c]=a[c]})},o=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}Object.defineProperty(b,"__esModule",{value:!0}),b.FramesAlgebra=void 0;var f=c(3),g=c(18),h=function(a){return f.utils.isDate(a)?a.getTime():a},i={cross:function(a,b,c){var d=a(),e=f.utils.unique(d.map(function(a){return a[b]}),h),g=f.utils.unique(d.map(function(a){return a[c]}),h),i=0===e.length?[null]:e,j=0===g.length?[null]:g;return j.reduce(function(a,d){return a.concat(i.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},cross_period:function(a,b,c,d,i,j){var k=a(),l=!!j&&j.utcTime,m=f.utils.unique(k.map(function(a){return a[b]}),h),n=f.utils.unique(k.map(function(a){return a[c]}),h),o=0===m.length?[null]:m,p=0===n.length?[null]:n;return d&&(o=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(m)),Math.max.apply(Math,e(m)),d,{utc:l})),i&&(p=g.UnitDomainPeriodGenerator.generate(Math.min.apply(Math,e(n)),Math.max.apply(Math,e(n)),i,{utc:l})),p.reduce(function(a,d){return a.concat(o.map(function(a){var e={};return b&&(e[b]=h(a)),c&&(e[c]=h(d)),e}))},[])},groupBy:function(a,b){var c=a(),e=f.utils.unique(c.map(function(a){return a[b]}),h);return e.map(function(a){return d({},b,h(a))})},none:function(){return[null]}};b.FramesAlgebra=i},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={day:{cast:function(a){var b=new Date(a);return new Date(b.setHours(0,0,0,0))},next:function f(a){var b=new Date(a),f=new Date(b.setDate(b.getDate()+1));return this.cast(f)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),new Date(b.setDate(b.getDate()-b.getDay()))},next:function g(a){var b=new Date(a),g=new Date(b.setDate(b.getDate()+7));return this.cast(g)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1))},next:function h(a){var b=new Date(a),h=new Date(b.setMonth(b.getMonth()+1));return this.cast(h)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1));var c=b.getMonth(),d=c-c%3;return new Date(b.setMonth(d))},next:function i(a){var b=new Date(a),i=new Date(b.setMonth(b.getMonth()+3));return this.cast(i)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setHours(0,0,0,0)),b=new Date(b.setDate(1)),b=new Date(b.setMonth(0))},next:function j(a){var b=new Date(a),j=new Date(b.setFullYear(b.getFullYear()+1));return this.cast(j)}}},d={day:{cast:function(a){var b=new Date(a);return new Date(b.setUTCHours(0,0,0,0))},next:function k(a){var b=new Date(a),k=new Date(b.setUTCDate(b.getUTCDate()+1));return this.cast(k)}},week:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),new Date(b.setUTCDate(b.getUTCDate()-b.getUTCDay()))},next:function l(a){var b=new Date(a),l=new Date(b.setUTCDate(b.getUTCDate()+7));return this.cast(l)}},month:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1))},next:function m(a){var b=new Date(a),m=new Date(b.setUTCMonth(b.getUTCMonth()+1));return this.cast(m)}},quarter:{cast:function(a){var b=new Date(a);b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1));var c=b.getUTCMonth(),d=c-c%3;return new Date(b.setUTCMonth(d))},next:function n(a){var b=new Date(a),n=new Date(b.setUTCMonth(b.getUTCMonth()+3));return this.cast(n)}},year:{cast:function(a){var b=new Date(a);return b=new Date(b.setUTCHours(0,0,0,0)),b=new Date(b.setUTCDate(1)),b=new Date(b.setUTCMonth(0))},next:function o(a){var b=new Date(a),o=new Date(b.setUTCFullYear(b.getUTCFullYear()+1));return this.cast(o)}}},e={add:function(a,b){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.DataFrame=function(){function a(b,c){var e=b.key,f=b.pipe,g=b.source,h=b.units,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=function I(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:I(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},j=c(21),k=c(6),l=c(24),m=c(3),n=c(1),o=c(9),p=c(7),q=c(25),r=c(26),s=c(27),t=c(28),u=c(29),v=c(30),w=c(31),x=c(33),y=c(35),z=c(36),A=c(22),B=c(16),C=c(2),D=d(C),E=c(37),F=d(E),G=n.utilsDom.selectOrAppend,H=n.utilsDom.selectImmediate;b.Plot=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c._nodes=[],c._svg=null,c._filtersStore={filters:{},tick:0},c._layout=(0,u.getLayout)();var d=0;a.settings=b.setupSettings(m.utils.defaults(a.settings||{},{references:new WeakMap,refCounter:function(){return++d}})),2===["sources","scales"].filter(function(b){return a.hasOwnProperty(b)}).length?c.configGPL=a:c.configGPL=new v.SpecConverter(c.setupConfig(a)).convert(),c.configGPL=b.setupPeriodData(c.configGPL);var g=a.plugins||[];return c.transformers=[y.SpecTransformApplyRatio,w.SpecTransformAutoLayout],c.onUnitsStructureExpandedTransformers=[z.SpecTransformExtractAxes,x.SpecTransformCalcSize],c._originData=Object.assign({},c.configGPL.sources),c._chartDataModel=function(a){return a},c._liveSpec=c.configGPL,c._plugins=new l.Plugins(g,c),c._reportProgress=null,c._taskRunner=null,c._renderingPhase=null,c}return g(b,a),h(b,[{key:"destroy",value:function(){this.destroyNodes(),D["default"].select(this._svg).remove(),D["default"].select(this._layout.layout).remove(),this._cancelRendering(),i(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}},{key:"setupChartSourceModel",value:function(a){this._chartDataModel=a}},{key:"setupConfig",value:function(a){if(!a.spec||!a.spec.unit)throw new Error("Provide spec for plot");var c=m.utils.defaults(a,{spec:{},data:[],plugins:[],settings:{}});this._emptyContainer=a.emptyContainer||"",c.spec.dimensions=b.setupMetaInfo(c.spec.dimensions,c.data);var d=c.settings.log;return c.settings.excludeNull&&this.addFilter({tag:"default",src:"/",predicate:t.DataProcessor.excludeNullValues(c.spec.dimensions,function(a){return d([a,"point was excluded, because it has undefined values."],"WARN")})}),c}},{key:"insertToLeftSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.leftSidebar)}},{key:"insertToRightSidebar",value:function(a){return n.utilsDom.appendTo(a,this._layout.rightSidebar)}},{key:"insertToFooter",value:function(a){return n.utilsDom.appendTo(a,this._layout.footer)}},{key:"insertToHeader",value:function(a){return n.utilsDom.appendTo(a,this._layout.header)}},{key:"addBalloon",value:function(a){return new j.Tooltip("",a||{})}},{key:"destroyNodes",value:function(){this._nodes.forEach(function(a){return a.destroy()}),this._nodes=[],this._renderedItems=[]}},{key:"onUnitDraw",value:function(a){var b=this;this._nodes.push(a),this.fire("unitdraw",a),["click","mouseover","mouseout"].forEach(function(c){return a.on(c,function(a,d){b.fire("element"+c,{element:a,data:d.data,event:d.event})})})}},{key:"onUnitsStructureExpanded",value:function(a){var b=this;this.onUnitsStructureExpandedTransformers.forEach(function(c){return new c(a).transform(b)}),this.fire(["units","structure","expanded"].join(""),a)}},{key:"_getClosestElementPerUnit",value:function(a,b){return this._renderedItems.filter(function(a){return a.getClosestElement}).map(function(c){var d=c.getClosestElement(a,b),e=c.node();return{unit:e,closest:d}})}},{key:"disablePointerEvents",value:function(){this._layout.layout.style.pointerEvents="none"}},{key:"enablePointerEvents",value:function(){this._layout.layout.style.pointerEvents=""}},{key:"_handlePointerEvent",value:function(a){var b=this._svg.getBoundingClientRect(),c=a.clientX-b.left,d=a.clientY-b.top,e=a.type,f="click"===e,g=f?"data-click":"data-hover",h=null,i=null,j=this._getClosestElementPerUnit(c,d),k=j.filter(function(a){return a.closest}).sort(function(a,b){return a.closest.distance===b.closest.distance?a.closest.secondaryDistance-b.closest.secondaryDistance:a.closest.distance-b.closest.distance});if(k.length>0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",\'Set "handleRenderingErrors: false" in chart settings to debug.\',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",\'\\n            <div class="\'+A.CSS_PREFIX+\'rendering-timeout-warning">\\n            <svg\\n                viewBox="0 0 \'+f+" "+g+\'">\\n                <text\\n                    text-anchor="middle"\\n                    font-size="\'+k+\'">\\n                    <tspan x="\'+j+\'" y="\'+l(1)+\'">Rendering took more than \'+Math.round(e)/1e3+\'s</tspan>\\n                    <tspan x="\'+j+\'" y="\'+l(2)+\'">Would you like to continue?</tspan>\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-continue-btn"\\n                    text-anchor="end"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j-k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Continue\\n                </text>\\n                <text\\n                    class="\'+A.CSS_PREFIX+\'rendering-timeout-cancel-btn"\\n                    text-anchor="start"\\n                    font-size="\'+k+\'"\\n                    cursor="pointer"\\n                    text-decoration="underline"\\n                    x="\'+(j+k/3)+\'"\\n                    y="\'+l(3)+\'">\\n                    Cancel\\n                </text>\\n            </svg>\\n            </div>\\n        \'),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d([\'Unknown period "\'+e.period+\'".\',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){\n"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d<b.length;d++)if(a.style[b[d]]=c,a.style[b[d]]===c)return b[d]}();var p=Object.create;h.prototype._createElement=function(){this.element=l.createElement("div"),this.classes=i(this.element),this.classes.add(this.options.baseClass);for(var a,b=0;b<h.classTypes.length;b++)a=h.classTypes[b]+"Class",this.options[a]&&this.classes.add(this.options[a])},h.prototype.type=function(a){return this.changeClassType("type",a)},h.prototype.effect=function(a){return this.changeClassType("effect",a)},h.prototype.changeClassType=function(a,b){return a+="Class",this.options[a]&&this.classes.remove(this.options[a]),this.options[a]=b,b&&this.classes.add(b),this},h.prototype.updateSize=function(){return this.hidden&&(this.element.style.visibility="hidden",l.body.appendChild(this.element)),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,null==this.spacing&&(this.spacing=null!=this.options.spacing?this.options.spacing:f(o(this.element,"top"))),this.hidden?(l.body.removeChild(this.element),this.element.style.visibility=""):this.position(),this},h.prototype.content=function(a){return"object"==typeof a?(this.element.innerHTML="",this.element.appendChild(a)):this.element.innerHTML=a,this.updateSize(),this},h.prototype.place=function(a){return this.options.place=a,this.hidden||this.position(),this},h.prototype.attach=function(a){return this.attachedTo=a,this.hidden||this.position(),this},h.prototype.detach=function(){return this.hide(),this.attachedTo=null,this},h.prototype._pickPlace=function(a){if(!this.options.auto)return this.options.place;var b=e(k),c=this.options.place.split("-"),d=this.spacing;if(j(n,c[0])!==-1)switch(a.top-this.height-d<=b.top?c[0]="bottom":a.bottom+this.height+d>=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b<d;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},b.Tooltip=h}])})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b,d){c(this,a),this.chart=d,this._plugins=b.map(this.initPlugin,this)}return d(a,[{key:"initPlugin",value:function(a){var b=this;a.init&&a.init(this.chart);var c=function(){};this.chart.on("destroy",a.destroy&&a.destroy.bind(a)||c),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}]),a}();b.Plugins=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.unitsRegistry=void 0;var d=c(8),e={},f={},g={reg:function(a,b,c){return c?(f[a]=c,e[a]=function(a,b){this.___tauchartsseed___=new b(this.init(a))},e[a].prototype=Object.assign({init:function(a){return a},defineGrammarModel:function(a){return this.node().defineGrammarModel(a)},getGrammarRules:function(a){return this.node().getGrammarRules(a)},getAdjustScalesRules:function(a){return this.node().getAdjustScalesRules(a)},createScreenModel:function(a){return this.node().createScreenModel(a)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},b)):e[a]=b,this},get:function(a){if(!e.hasOwnProperty(a))throw new d.TauChartError("Unknown unit type: "+a,d.errorCodes.UNKNOWN_UNIT_TYPE);return e[a]},create:function(a,b){var c,d=this.get(a);if(f[a]){var e=this.get(f[a]);c=new d(b,e)}else c=new d(b);return c}};b.unitsRegistry=g},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e={},f={};b.scalesRegistry=function(){function a(){c(this,a)}return d(a,null,[{key:"reg",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(19);b.ScalesFactory=function(){function a(b,c,e){d(this,a),this.registry=b,this.sources=c,this.scales=e}return e(a,[{key:"createScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecConverter=function(){function a(b){d(this,a),this.spec=b,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:b.settings}}return e(a,[{key:"convert",value:function(){var a=this.spec,b=this.dist;return this.ruleAssignSourceDims(a,b),this.ruleAssignStructure(a,b),this.ruleAssignSourceData(a,b),this.ruleApplyDefaults(b),b}},{key:"ruleApplyDefaults",value:function(a){var b=a.settings||{},c=function e(a,b,c){b(a,c),(a.units||[]).map(function(c){return e(c,b,a)})},d=function(a,c){if(a.namespace="chart",a.guide=f.utils.defaults(a.guide||{},{animationSpeed:b.animationSpeed||0,utcTime:b.utcTime||!1}),c&&!a.hasOwnProperty("units")){a=f.utils.defaults(a,{x:c.x,y:c.y});var d=f.utils.clone(c.guide)||{};a.guide.x=f.utils.defaults(a.guide.x||{},d.x),a.guide.y=f.utils.defaults(a.guide.y||{},d.y),a.expression.inherit=c.expression.inherit}return a};c(a.unit,d,null)}},{key:"ruleAssignSourceData",value:function(a,b){var c=a.spec.dimensions||{},d=b.sources["/"].dims,e=function(a,b){var c=a[b];return f.utils.isObject(c)&&!f.utils.isDate(c)&&Object.keys(c).forEach(function(d){return a[b+"."+d]=c[d]}),a};b.sources["/"].data=a.data.map(function(a){var b=Object.keys(a).reduce(e,a);return Object.keys(d).reduce(function(a,b){return a.hasOwnProperty(b)||(a[b]=null),null!==a[b]&&c[b]&&["period","time"].indexOf(c[b].scale)>=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(3),i=c(32),j=c(2),k=d(j),l=function(a){return a.reduce(function(a,b){return a+b},0)},m=function(a,b){var c=b.guide||{},d={x:["label"],y:["label"],size:["label"],color:["label"],padding:[]};return Object.keys(d).forEach(function(b){var e=d[b];f(c,a,b,e)}),Object.assign(a.guide,Object.keys(c).reduce(function(a,b){return d.hasOwnProperty(b)||(a[b]=c[b]),a},{})),a},n=function(a,b,c){return a[b]=h.utils.defaults(a[b]||{},{label:""}),a[b].label=h.utils.isObject(a[b].label)?a[b].label:{text:a[b].label},a[b].label=h.utils.defaults(a[b].label,c||{},{padding:32,rotate:0,textAnchor:"middle",cssClass:"label",dock:null}),a[b]},o=function(a,b,c){return a[b]=h.utils.defaults(a[b],c||{},{padding:0,density:30,rotate:0,tickPeriod:null,tickFormat:null,autoScale:!0}),a[b].tickFormat=a[b].tickFormat||a[b].tickPeriod,a[b].nice=a[b].hasOwnProperty("nice")?a[b].nice:a[b].autoScale,a[b]},p=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.utils.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=n(a.guide,"x"),a.guide.x=o(a.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),a.guide.y=n(a.guide,"y",{rotate:-90}),a.guide.y=o(a.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),a.guide.size=n(a.guide,"size"),a.guide.color=n(a.guide,"color"),a},q=function(a,b){return a.guide=a.guide||{},a.guide.padding=a.guide.padding||{l:0,t:0,r:0,b:0},a.hasOwnProperty("units")||(a=h.utils.defaults(a,b),a.guide=h.utils.defaults(a.guide,h.utils.clone(b.guide)),a.guide.x=h.utils.defaults(a.guide.x,h.utils.clone(b.guide.x)),a.guide.y=h.utils.defaults(a.guide.y,h.utils.clone(b.guide.y))),a},r=function(a){var b=a.units||[],c=!a.hasOwnProperty("units"),d=!b.some(function(a){return a.hasOwnProperty("units")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},s=function(a,b,c,d){if(0===a.length)return{width:0,height:0};if(null===b){var e=c("TauChart Library");return e.width=.625*d,e}a.every(function(a){return"number"==typeof a})&&(a=k["default"].scale.linear().domain(a).ticks());var f=a.reduce(function(a,c){var d=b(c).toString().length;return!a.computed||d>a.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&c<a[1]});return d[e][2]},y=function(a,b,c){var d=Math.ceil(a.width/b),e=Math.min(d,c);return{height:e*a.height,width:b}},z=function(a,b,c,d,e){var f=c.values,g=d.values,h=c.isEmpty||a.x.hideTicks,j=d.isEmpty||a.y.hideTicks,k=s(f,i.FormatterRegistry.get(a.x.tickFormat,a.x.tickFormatNullAlias),b.getAxisTickLabelSize,b.xAxisTickLabelLimit),m=s(g,i.FormatterRegistry.get(a.y.tickFormat,a.y.tickFormatNullAlias),b.getAxisTickLabelSize,b.yAxisTickLabelLimit),n=k,o=m;k.width>b.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" \u2192 ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b \'%y":"%b";\nreturn g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b \'%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformCalcSize=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(3),h=c(34),i=function(a){return a.$maxTickTextW},j=function(a){return 0==a.rotate?a.$maxTickTextW:a.$maxTickTextH},k=function(a){return a.density},l=function(a){var b=[],c=[],d=function h(a){if("COORDS.RECT"===a.type&&a.units&&a.units[0]&&"COORDS.RECT"===a.units[0].type){var d=a.x.replace(/^x_/,""),e=a.y.replace(/^y_/,"");"null"!==d&&b.push(d),"null"!==e&&c.push(e),a.units.forEach(h)}};d(a.unit);var e={},f={},g=function i(a){"COORDS.RECT"===a.type&&a.frames.forEach(function(a){if(a.key){var d=Object.keys(a.key);d.forEach(function(d){b.indexOf(d)>=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-o<c.settings.minChartHeight||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-n<c.settings.minChartWidth||m*c.settings.minFacetHeight+o>a.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.l<c.settings.minChartWidth&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y"),a.height-e.padding.b+e.paddingNoTicks.b<c.settings.minChartHeight&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"));var f=a.width,g=b("x",c.unit,i);if(g<=a.width)d(c.unit,c.settings);else{var l=b("x",c.unit,j);if(l>a.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-f<c.settings.minChartWidth||l(c).xFacetCount*c.settings.minFacetWidth+f>a.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-e<c.settings.minChartHeight||l(c).yFacetCount*c.settings.minFacetHeight+e>a.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.SpecTransformOptimize=function(){function a(){c(this,a)}return d(a,null,[{key:"optimizeXAxisLabel",value:function(a,b){var c=b.xAxisTickLabelLimit,d=function f(a){if(!a.guide.x.hide&&!a.guide.x.hideTicks&&0!==a.guide.x.rotate){a.guide.x.rotate=0,a.guide.x.textAnchor="middle";var b=Math.min(c,a.guide.x.$maxTickTextW),d=0-b+a.guide.x.$maxTickTextH;e(a,d)}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return f(a)})},e=function(b,c){a!==b&&"extract-axes"===b.guide.autoLayout?(a.guide.x.padding+=c,a.guide.padding.b+=c):(b.guide.x.label.padding+=b.guide.x.label.padding>0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformApplyRatio=function(){function a(b){d(this,a),this.spec=b,this.isApplicable=b.settings.autoRatio&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;try{this.ruleApplyRatio(b,a)}catch(c){if("Not applicable"!==c.message)throw c}return b}},{key:"ruleApplyRatio",value:function(a,b){var c=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},d=function(a){return 0===a.type.indexOf("ELEMENT.")},e=function s(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3);b.SpecTransformExtractAxes=function(){function a(b){d(this,a),this.spec=b,this.isApplicable="EXTRACT"===b.settings.layoutEngine&&f.utils.isSpecRectCoordsOnly(b.unit)}return e(a,[{key:"transform",value:function(){var a=this.spec;if(!this.isApplicable)return a;try{this.ruleExtractAxes(a)}catch(b){if("Not applicable"!==b.message)throw b;console.log("[TauCharts]: can\'t extract axes for the given chart specification")}return a}},{key:"ruleExtractAxes",value:function(a){var b=function(a){return"COORDS.RECT"===a.type||"RECT"===a.type},c=function(a){return 0===a.type.indexOf("ELEMENT.")},d=function(a){return a?10:0},e={l:0,r:10,t:10,b:0},g={l:0,b:0},h=[],i=[],j=function(a,d){if(d>1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error(\'Task Runner "\'+c+\'" property is not "\'+b+\'"\')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=function m(a,b,c){null===a&&(a=Function.prototype);var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:m(e,b,c)}if("value"in d)return d.value;var f=d.get;if(void 0!==f)return f.call(c)},i=c(20),j=c(3),k=c(39),l=function(a){function b(a){d(this,b);var c=k.chartTypesRegistry.validate(a.type,a);if(c.length>0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a<b;a++)l.winAware[a].resize()}var c=void 0;return a}(),window.addEventListener("resize",l.resizeOnWindowEvent),b.Chart=l},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.chartTypesRegistry=void 0;var d=c(8),e={},f={},g=function(a){var b="Chart type "+a+" is not supported.";throw console.log(b),console.log("Use one of "+Object.keys(e).join(", ")+"."),new d.TauChartError(b,d.errorCodes.NOT_SUPPORTED_TYPE_CHART)},h={validate:function(a,b){return f.hasOwnProperty(a)||g(a),f[a].reduce(function(a,c){return a.concat(c(b)||[])},[])},get:function(a){var b=e[a];return"function"!=typeof b&&g(a),b},add:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Cartesian=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(1),n=c(10),o=c(3),p=c(22),q=c(32),r=c(9),s=m.utilsDom.selectOrAppend,t=function(a){var b=20,c=a<=b?1:.75;return Math.max(2,Math.round(a*c))};b.Cartesian=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=o.utils.defaults(c.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),c.config.guide.x=c.config.guide.x||{},c.config.guide.x=o.utils.defaults(c.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.x.label&&(c.config.guide.x.label={text:c.config.guide.x.label}),c.config.guide.x.label=o.utils.defaults(c.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),c.config.guide.y=c.config.guide.y||{},c.config.guide.y=o.utils.defaults(c.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof c.config.guide.y.label&&(c.config.guide.y.label={text:c.config.guide.y.label}),c.config.guide.y.label=o.utils.defaults(c.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var d=c.config,e=d.guide;if("extract-axes"===e.autoLayout){var h=d.options.containerHeight,i=h-(d.options.top+d.options.height);e.x.hide=Math.floor(i)>0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Parallel=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(2),k=d(j),l=c(5),m=c(10),n=c(3),o=c(22),p=c(32);b.Parallel=function(a){function b(a){f(this,b);var c=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));c.config=a,c.config.guide=n.utils.defaults(c.config.guide||{},{padding:{l:50,r:50,t:50,b:50},enableBrushing:!1}),c.columnsBrushes={},c.on("force-brush",function(a,b){return c._forceBrushing(b)});var d=c.config.options,e=c.config.guide.padding;return c.L=d.left+e.l,c.T=d.top+e.t,c.W=d.width-(e.l+e.r),c.H=d.height-(e.t+e.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=this.W,d=this.H;this.columnsScalesMap=b.columns.reduce(function(b,c){return b[c]=a("pos",c,[d,0]),b},{});var e=c/(b.columns.length-1),f=b.columns.reduce(function(a,b,c){return a[b]=c*e,a},{});return this.xBase=function(a){return f[a]},this.regScale("columns",this.columnsScalesMap),{}}},{key:"allocateRect",value:function(){var a=this;return{slot:function(b){return a.config.options.container.selectAll(".uid_"+b)},left:0,top:0,width:this.W,height:this.H,containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=this,c=Object.assign({},this.config),d=c.options,e=function(a,b,c){var d=b.selectAll(".layer_"+a).data(c.units,function(a){return a.uid});d.exit().remove(),d.enter().append("g").attr("class",function(b){return"layer_"+a+" uid_"+b.uid})},f=function(a){e(d.frameId,k["default"].select(this),a)},g=this._fnDrawGrid(d.container,c,d.frameId,Object.keys(this.columnsScalesMap).reduce(function(a,c){return a.concat([b.columnsScalesMap[c].getHash()])},[]).join("_")),h=g.selectAll(".parent-frame-"+d.frameId).data(a,function(a){return a.hash()});h.exit().remove(),h.each(f),h.enter().append("g").attr("class",function(a){return o.CSS_PREFIX+"cell cell parent-frame-"+d.frameId+" frame-"+a.hash()}).each(f);var i=this._fnDrawColumns(g,c);c.guide.enableBrushing&&this._enableBrushing(i)}},{key:"_fnDrawGrid",value:function(a,b,c,d){var e=a.selectAll(".grid_"+c).data([d],function(a){return a});return e.exit().remove(),e.enter().append("g").attr("class","grid grid_"+c).attr("transform",m.utilsDraw.translate(this.L,this.T)),e}},{key:"_fnDrawColumns",value:function(a,b){var c=b.guide.columns||{},d=this.xBase,e=this.columnsScalesMap,f=k["default"].svg.axis().orient("left"),g=a.selectAll(".column").data(b.columns,function(a){return a});return g.exit().remove(),g.enter().append("g").attr("class","column").attr("transform",function(a){return m.utilsDraw.translate(d(a),0)}).call(function(){this.append("g").attr("class","y axis").each(function(a){var b=e[a].dim,d=f.scale(e[a]),g=c[b]||{},h=p.FormatterRegistry.get(g.tickFormat,g.tickFormatNullAlias);null!==h&&d.tickFormat(h),k["default"].select(this).call(d)}).append("text").attr("class","label").attr("text-anchor","middle").attr("y",-9).text(function(a){return((c[a]||{}).label||{}).text||e[a].dim})}),g}},{key:"_enableBrushing",value:function(a){var b=this,c=16,d=this.columnsScalesMap,e=this.columnsBrushes,f=function(a){return a},g=function(a){return a},h=function(){var a=Object.keys(e).filter(function(a){return!e[a].empty()}).map(function(a){var b=e[a].extent(),c=[];return c=d[a].discrete?d[a].domain().filter(function(c){var e=d[a](c);return b[0]<=e&&b[1]>=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[];\nif(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(2),j=d(i),k=c(3),l=c(43),m=d(l),n=c(44),o=c(5);j["default"].labeler=n.d3Labeler;var p=5.5,q=10,r=.5,s=["land","continents","georegions","countries","regions","subunits","states","counties"];b.GeoMap=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{defaultFill:"rgba(128,128,128,0.25)",padding:{l:0,r:0,t:0,b:0},showNames:!0}),c.contourToFill=null,c.on("highlight-area",function(a,b){return c._highlightArea(b)}),c.on("highlight-point",function(a,b){return c._highlightPoint(b)}),c.on("highlight",function(a,b){return c._highlightPoint(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options,d=b.guide.padding,e=c.width-(d.l+d.r),f=c.height-(d.t+d.b);return this.latScale=a("pos",b.latitude,[0,f]),this.lonScale=a("pos",b.longitude,[e,0]),this.sizeScale=a("size",b.size),this.colorScale=a("color",b.color),this.codeScale=a("value",b.code),this.fillScale=a("fill",b.fill),this.W=e,this.H=f,this.regScale("latitude",this.latScale).regScale("longitude",this.lonScale).regScale("size",this.sizeScale).regScale("color",this.colorScale).regScale("code",this.codeScale).regScale("fill",this.fillScale),{}}},{key:"drawFrames",value:function(a){var b=this,c=this.config.guide;"string"==typeof c.sourcemap?j["default"].json(c.sourcemap,function(c,d){if(c)throw c;b._drawMap(a,d)}):this._drawMap(a,c.sourcemap)}},{key:"_calcLabels",value:function(a,b,c){var d=this.W,e=this.H,f={};return b.forEach(function(b){var g=m["default"].feature(a,a.objects[b]).features||[],h=g.map(function(a){var e=a.properties||{},f=c.centroid(a),g=c.bounds(a),h=f[0],i=f[1],j=g[1][0],k=g[0][0],l=j-k,m=e.name||"",n=e.abbr||m,o=l<m.length*p,q=o?n:m,r=l<2.5*p,s=r?d-h-3*p:0;return{id:b+"-"+a.id,sx:h,sy:i,x:h+s,y:i,width:q.length*p,height:10,name:q,r:s,isRef:r}}).filter(function(a){return!Number.isNaN(a.x)&&!Number.isNaN(a.y)}),i=h.map(function(a){return{x:a.sx,y:a.sy,r:a.r}});j["default"].labeler().label(h).anchor(i).width(d).height(e).start(q),h.filter(function(a){return!a.isRef}).map(function(a){return a.x=a.sx,a.y=a.sy,a}).reduce(function(a,b){return a[b.id]=b,a},f);var k=h.filter(function(a){return a.isRef});k.length<6&&k.reduce(function(a,b){return a[b.id]=b,a},f)}),f}},{key:"_drawMap",value:function(a,b){var c=this,d=this,e=this.config.guide,f=this.config.options,g=this.config.options.container,h=this.latScale,i=this.lonScale,k=this.sizeScale,l=this.colorScale,n=this.codeScale,o=this.fillScale,q=this.W,t=this.H,u=s.filter(function(a){return(b.objects||{}).hasOwnProperty(a)});if(0===u.length)throw new Error("Invalid map: should contain some contours");var v;if(o.dim){if(!n.georole)throw console.log("Specify [georole] for code scale"),new Error("[georole] is missing");if(u.indexOf(n.georole)===-1)throw console.log(\'There is no contour for georole "\'+n.georole+\'"\'),console.log("Available contours are: "+u.join(" | ")),new Error("Invalid [georole]");v=n.georole}else v=u[u.length-1];this.contourToFill=v;var w;if(h.dim&&i.dim){var x=j["default"].extent(h.domain()),y=j["default"].extent(i.domain());w=[(y[1]+y[0])/2,(x[1]+x[0])/2]}var z=this._createProjection(b,u[0],w),A=j["default"].geo.path().projection(z),B=g.selectAll(".map-container").data([""+q+t+w+u.join("-")],function(a){return a});B.exit().remove(),B.enter().append("g").call(function(){var a=this;a.attr("class","map-container");var c={},f=u.reduceRight(function(a,b){return a.concat(b)},[]);if(e.showNames&&(c=d._calcLabels(b,f,A)),f.forEach(function(d,e){var f=function(a){return c[d+"-"+a.id]};a.selectAll(".map-contour-"+d).data(m["default"].feature(b,b.objects[d]).features||[]).enter().append("g").call(function(){var a=this;a.attr("class","map-contour-"+d+" map-contour-level map-contour-level-"+e).attr("fill","none"),a.append("title").text(function(a){return(a.properties||{}).name}),a.append("path").attr("d",A),a.append("text").attr("class","place-label-"+d).attr("transform",function(a){var b=f(a);return b?"translate("+[b.x,b.y]+")":""}).text(function(a){var b=f(a);return b?b.name:""}),a.append("line").attr("class","place-label-link-"+d).attr("stroke","gray").attr("stroke-width",.25).attr("x1",function(a){var b=f(a);return b&&b.isRef?b.sx:0}).attr("y1",function(a){var b=f(a);return b&&b.isRef?b.sy:0}).attr("x2",function(a){var b=f(a);return b&&b.isRef?b.x-.6*b.name.length*p:0}).attr("y2",function(a){var b=f(a);return b&&b.isRef?b.y-3.5:0})})}),b.objects.hasOwnProperty("places")){var g=m["default"].feature(b,b.objects.places),h=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0]+3.5,y:b[1]+3.5,width:a.properties.name.length*p,height:12,name:a.properties.name}}),i=g.features.map(function(a){var b=z(a.geometry.coordinates);return{x:b[0],y:b[1],r:2.5}});j["default"].labeler().label(h).anchor(i).width(q).height(t).start(100),a.selectAll(".place").data(i).enter().append("circle").attr("class","place").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).attr("r",function(a){return a.r+"px"}),a.selectAll(".place-label").data(h).enter().append("text").attr("class","place-label").attr("transform",function(a){return"translate("+a.x+","+a.y+")"}).text(function(a){return a.name})}}),this.groupByCode=a.reduce(function(a,b){return b.part().reduce(function(a,b){var c=(b[n.dim]||"").toLowerCase();return a[c]=b,a},a)},{});var C=this._resolveFeature.bind(this);if(B.selectAll(".map-contour-"+v).data(m["default"].feature(b,b.objects[v]).features).call(function(){this.classed("map-contour",!0).attr("fill",function(a){var b=C(a);return null===b?e.defaultFill:o(b[o.dim])})}).on("mouseover",function(a){return c.fire("area-mouseover",{data:C(a),event:j["default"].event})}).on("mouseout",function(a){return c.fire("area-mouseout",{data:C(a),event:j["default"].event})}).on("click",function(a){return c.fire("area-click",{data:C(a),event:j["default"].event})}),!h.dim||!i.dim)return[];var D=function(){return this.attr({r:function(a){var b=a.data;return k(b[k.dim])},transform:function(a){var b=a.data;return"translate("+z([b[i.dim],b[h.dim]])+")"},"class":function(a){var b=a.data;return l(b[l.dim])},opacity:r}).on("mouseover",function(a){var b=a.data;return d.fire("point-mouseover",{data:b,event:j["default"].event})}).on("mouseout",function(a){var b=a.data;return d.fire("point-mouseout",{data:b,event:j["default"].event})}).on("click",function(a){var b=a.data;return d.fire("point-click",{data:b,event:j["default"].event})})},E=function(){this.attr("class",function(a){return"frame frame-"+a.hash}).call(function(){var a=this.selectAll("circle").data(function(a){return a.data.map(function(a){return{data:a,uid:f.uid}})});a.exit().remove(),a.call(D),a.enter().append("circle").call(D)})},F=function(a){return{tags:a.key||{},hash:a.hash(),data:a.part()}},G=B.selectAll(".frame").data(a.map(F),function(a){return a.hash});return G.exit().remove(),G.call(E),G.enter().append("g").call(E),[]}},{key:"_resolveFeature",value:function(a){var b,c=this.groupByCode,d=a.properties,e=["c1","c2","c3","abbr","name"].filter(function(a){return d.hasOwnProperty(a)&&d[a]&&c.hasOwnProperty(d[a].toLowerCase())});if(0===e.length)b=null;else if(e.length>0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p<q?p:q,h=[d-(o[0][0]+o[1][0])/2,e-(o[0][1]+o[1][1])/2],this._createD3Projection(k,i,g,h)}},{key:"_createD3Projection",value:function(a,b,c,d){var e=j["default"].geo[a];if(!e)throw console.log(\'Unknown projection "\'+a+\'"\'),console.log("See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections"),new Error(\'Invalid map: unknown projection "\'+a+\'"\');var f=e(),g=[{method:"scale",args:c},{method:"center",args:b},{method:"translate",args:d}].filter(function(a){return a.args});return g.reduce(function(a,b){return a[b.method]&&(a=a[b.method](b.args)),a},f)}}]),b}(o.Element)},function(a,b,c){!function(a,c){c(b)}(this,function(a){"use strict";function b(){}function c(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0),a[0]=(c+=a[0])*e+g,a[1]=(d+=a[1])*f+h}}function d(a){if(!a)return b;var c,d,e=a.scale[0],f=a.scale[1],g=a.translate[0],h=a.translate[1];return function(a,b){b||(c=d=0);var i=(a[0]-g)/e|0,j=(a[1]-h)/f|0;a[0]=i-c,a[1]=j-d,c=i,d=j}}function e(a,b){for(var c,d=a.length,e=d-b;e<--d;)c=a[e],a[e++]=a[d],a[d]=c}function f(a,b){for(var c=0,d=a.length;c<d;){var e=c+d>>>1;a[e]<b?c=e+1:d=e}return c}function g(a,b){return"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(b){return h(a,b)})}:h(a,b)}function h(a,b){var c={type:"Feature",id:b.id,properties:b.properties||{},geometry:i(a,b)};return null==b.id&&delete c.id,c}function i(a,b){function d(a,b){b.length&&b.pop();for(var c,d=l[a<0?~a:a],f=0,g=d.length;f<g;++f)b.push(c=d[f].slice()),k(c,f);a<0&&e(b,g)}function f(a){return a=a.slice(),k(a,0),a}function g(a){for(var b=[],c=0,e=a.length;c<e;++c)d(a[c],b);return b.length<2&&b.push(b[0].slice()),b}function h(a){for(var b=g(a);b.length<4;)b.push(b[0].slice());return b}function i(a){return a.map(h)}function j(a){var b=a.type;return"GeometryCollection"===b?{type:b,geometries:a.geometries.map(j)}:b in m?{type:b,coordinates:m[b](a)}:null}var k=c(a.transform),l=a.arcs,m={Point:function(a){return f(a.coordinates)},MultiPoint:function(a){return a.coordinates.map(f)},LineString:function(a){return g(a.arcs)},MultiLineString:function(a){return a.arcs.map(g)},Polygon:function(a){return i(a.arcs)},MultiPolygon:function(a){return a.arcs.map(i)}};return j(b)}function j(a,b){function c(b){var c,d=a.arcs[b<0?~b:b],e=d[0];return a.transform?(c=[0,0],d.forEach(function(a){c[0]+=a[0],c[1]+=a[1]})):c=d[d.length-1],b<0?[c,e]:[e,c]}function d(a,b){for(var c in a){var d=a[c];delete b[d.start],delete d.start,delete d.end,d.forEach(function(a){e[a<0?~a:a]=1}),h.push(d)}}var e={},f={},g={},h=[],i=-1;return b.forEach(function(c,d){var e,f=a.arcs[c<0?~c:c];f.length<3&&!f[1][0]&&!f[1][1]&&(e=b[++i],b[i]=c,b[d]=e)}),b.forEach(function(a){var b,d,e=c(a),h=e[0],i=e[1];if(b=g[h])if(delete g[b.end],b.push(a),b.end=i,d=f[i]){delete f[d.start];var j=d===b?b:b.concat(d);f[j.start=b.start]=g[j.end=d.end]=j}else f[b.start]=g[b.end]=b;else if(b=f[i])if(delete f[b.start],b.unshift(a),b.start=h,d=g[h]){delete g[d.end];var k=d===b?b:d.concat(b);f[k.start=d.start]=g[k.end=b.end]=k}else f[b.start]=g[b.end]=b;else b=[a],f[b.start=h]=g[b.end=i]=b}),d(g,f),d(f,g),b.forEach(function(a){e[a<0?~a:a]||h.push([a])}),h}function k(a){return i(a,l.apply(this,arguments))}function l(a,b,c){function d(a){var b=a<0?~a:a;(k[b]||(k[b]=[])).push({i:a,g:i})}function e(a){a.forEach(d)}function f(a){a.forEach(e)}function g(a){"GeometryCollection"===a.type?a.geometries.forEach(g):a.type in l&&(i=a,l[a.type](a.arcs))}var h=[];if(arguments.length>1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m<n;++m)h.push(m);return{type:"MultiLineString",arcs:j(a,h)}}function m(a){var b=a[0],c=a[1],d=a[2];return Math.abs((b[0]-d[0])*(c[1]-b[1])-(b[0]-c[0])*(d[1]-b[1]))}function n(a){for(var b,c=-1,d=a.length,e=a[d-1],f=0;++c<d;)b=e,e=a[c],f+=b[0]*e[1]-b[1]*e[0];return f/2}function o(a){return i(a,p.apply(this,arguments))}function p(a,b){function c(a){a.forEach(function(b){b.forEach(function(b){(e[b=b<0?~b:b]||(e[b]=[])).push(a)})}),f.push(a)}function d(b){return n(i(a,{type:"Polygon",arcs:[b]}).coordinates[0])>0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i<c;++i)if(h===d(f[i])){g=f[0],f[0]=f[i],f[i]=g;break}return f})}}function q(a){function b(a,b){a.forEach(function(a){a<0&&(a=~a);var c=e[a];c?c.push(b):e[a]=[b]})}function c(a,c){a.forEach(function(a){b(a,c)})}function d(a,b){"GeometryCollection"===a.type?a.geometries.forEach(function(a){d(a,b)}):a.type in h&&h[a.type](a.arcs,b)}var e={},g=a.map(function(){return[]}),h={LineString:b,MultiLineString:c,Polygon:c,MultiPolygon:function(a,b){a.forEach(function(a){c(a,b)})}};a.forEach(d);for(var i in e)for(var j=e[i],k=j.length,l=0;l<k;++l)for(var m=l+1;m<k;++m){var n,o=j[l],p=j[m];(n=g[o])[i=f(n,p)]!==p&&n.splice(i,0,p),(n=g[p])[i=f(n,o)]!==o&&n.splice(i,0,o)}return g}function r(a,b){return a[1][2]-b[1][2]}function s(){function a(a,b){for(;b>0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f<e&&r(d[f],h)<0&&(h=d[g=f]),c<e&&r(d[c],h)<0&&(h=d[g=c]),g===b)break;d[h._=b]=h,d[a._=b=g]=a}}var c={},d=[],e=0;return c.push=function(b){return a(d[b._=e]=b,e++),e},c.pop=function(){if(!(e<=0)){var a,c=d[0];return--e>0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d<i;++d)j=a[d],f(a[d]=[j[0],j[1],1/0],d);for(d=1,i=a.length-1;d<i;++d)c=a.slice(d-1,d+2),c[1][2]=b(c),k.push(c),h.push(c);for(d=0,i=k.length;d<i;++d)c=k[d],c.previous=k[d-1],c.next=k[d+1];for(;c=h.pop();){var m=c.previous,n=c.next;c[1][2]<l?c[1][2]=l:l=c[1][2],m&&(m.next=n,m[2]=c[2],e(m)),n&&(n.previous=m,n[0]=c[0],e(n))}a.forEach(g)}),a}var u="1.6.24";a.version=u,a.mesh=k,a.meshArcs=l,a.merge=o,a.mergeArcs=p,a.feature=g,a.neighbors=q,a.presimplify=t})},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(){var a,b=[],c=[],d=1,e=1,f={},g=5,h=.5,i=0,j=0,k=.2,l=1,m=30,n=30,o=3,p=!1,q=function(a){var d=b.length,e=0,f=b[a].x-c[a].x,g=c[a].y-b[a].y,h=Math.sqrt(f*f+g*g),i=!0;h>0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;A<d;A++)A!=a&&(i=t(c[a].x,b[a].x,c[A].x,b[A].x,c[a].y,b[a].y,c[A].y,b[A].y),i&&(e+=l),j=b[A].x,q=b[A].y-b[A].height+2,p=b[A].x+b[A].width,r=b[A].y+2,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*m),j=c[A].x-c[A].r,q=c[A].y-c[A].r,p=c[A].x+c[A].r,r=c[A].y+c[A].r,s=Math.max(0,Math.min(p,y)-Math.max(j,w)),u=Math.max(0,Math.min(r,z)-Math.max(q,x)),v=s*u,e+=v*n;return e},r=function(f){var h,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;h=p?a(k,b,c):q(k),b[k].x+=(Math.random()-.5)*g,b[k].y+=(Math.random()-.5)*g,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()<Math.exp(-o/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},s=function(f){var g,k=Math.floor(Math.random()*b.length),l=b[k].x,m=b[k].y;g=p?a(k,b,c):q(k);var n=(Math.random()-.5)*h,o=Math.sin(n),r=Math.cos(n);b[k].x-=c[k].x,b[k].y-=c[k].y;var s=b[k].x*r-b[k].y*o,t=b[k].x*o+b[k].y*r;b[k].x=s+c[k].x,b[k].y=t+c[k].y,b[k].x>d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()<Math.exp(-v/f)?i+=1:(b[k].x=l,b[k].y=m,j+=1)},t=function(a,b,c,d,e,f,g,h){var i,j,k,l,m;return k=(h-g)*(b-a)-(d-c)*(f-e),l=(d-c)*(e-g)-(h-g)*(a-c),m=(b-a)*(e-g)-(f-e)*(a-c),i=l/k,j=m/k,!(i<0||i>1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;f<a;f++){for(var g=0;g<c;g++)Math.random()<.5?r(d):s(d);d=u(d,e,a)}},f.width=function(a){return arguments.length?(d=a,f):d},f.height=function(a){return arguments.length?(e=a,f):e},f.label=function(a){return arguments.length?(b=a,f):b},f.anchor=function(a){return arguments.length?(c=a,f):c},f.alt_energy=function(b){return arguments.length?(a=b,p=!0,f):q},f.alt_schedule=function(){return arguments.length?f:u},f};b.d3Labeler=c},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Point=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o={init:function(a){var b=Object.assign({},a);b.guide=j.utils.defaults(b.guide||{},{animationSpeed:0,avoidScalesOverflow:!0,enableColorToBarPosition:!1,maxHighlightDistance:32}),b.guide.size=b.guide.size||{},b.guide.label=j.utils.defaults(b.guide.label||{},{position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-anchor-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition;return b.transformRules=[function(a){var b=[a.scaleX,a.scaleY].sort(function(a,b){var c=a.discrete?1:0,d=b.discrete?1:0;return d*b.domain().length-c*a.domain().length})[0],c=a.scaleY===b;return c?g.GrammarRegistry.get("flip")(a):g.GrammarRegistry.get("identity")(a)},b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[b.stack&&g.GrammarRegistry.get("adjustYScale"),function(a,c){var d=a.scaleSize.isEmptyScale(),e=j.utils.defaults(b.guide.size,{defMinSize:10,defMaxSize:d?10:40,enableDistributeEvenly:!d}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize}),h=e.enableDistributeEvenly?g.GrammarRegistry.get("adjustSigmaSizeScale"):g.GrammarRegistry.get("adjustStaticSizeScale");return h(a,f)},c&&function(a,b){var c=Object.assign({},b,{sizeDirection:"xy"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.options;c.container=c.slot(b.uid);var d=function(a){return(0,i.d3_transition)(a,b.guide.animationSpeed)},e=f.CSS_PREFIX+"dot dot i-role-element i-role-datum",g=a.screenModel,j=1e4,k={fill:function(a){return g.color(a)},"class":function(a){return e+" "+g["class"](a)}},l={r:function(a){return Math.round(j*g.size(a)/2)/j},cx:function(a){return g.x(a)},cy:function(a){return g.y(a)}},m=function(){this.attr("class","frame").call(function(){var b=this.selectAll("circle").data(function(a){return a},g.id);d(b.enter().append("circle").attr(k)).attr(l),d(b.attr(k)).attr(l),d(b.exit()).attr({r:0}).remove(),a.subscribe(b)}),d(this).attr("opacity",1)},n=g.toFibers();this._getGroupOrder=function(){var a=n.reduce(function(a,b,c){return a.set(b,c),a},new Map);return function(b){return a.get(b)}}();var o=c.container.selectAll(".frame").data(n,function(a){return g.group(a[0])});o.enter().append("g").attr("opacity",0).call(m),o.call(m),this._boundsInfo=this._getBoundsInfo(o.selectAll(".dot").reduce(function(a,b){return a.concat(b)},[])),d(o.exit()).attr("opacity",0).remove().selectAll("circle").attr("r",0),a.subscribe(new h.LayerLabels(g.model,g.flip,b.guide.label,c).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.y(c),f=b.size(c)/2;return{node:a,data:c,x:d,y:e,r:f}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),d=c.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),e=c.reduce(function(a,b){var c=b.x+","+b.y;return a[c]||(a[c]=[]),a[c].push(b),a},{}),f=n["default"].geom.quadtree().x(function(a){return a[0].x}).y(function(a){return a[0].y})(Object.keys(e).map(function(a){return e[a]}));return{bounds:d,tree:f}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=l.utilsDraw.getDeepTransformTranslate(f.node()),h=a-g.x,i=b-g.y,j=this.node().config.guide.maxHighlightDistance;if(h<d.left-j||h>d.right+j||i<d.top-j||i>d.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b<a.r?a.r-b:b;return{node:a.node,data:a.data,x:a.x,y:a.y,distance:b,secondaryDistance:c}}).filter(function(a){return a}).sort(function(a,b){return a.secondaryDistance-b.secondaryDistance}),m=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=m<0?k:k.slice(0,m);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-i,o-h)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".dot").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(a)},_sortElements:function(a){var b=this,c=this.node().config.options.container,d=new Map,e=new Map;c.selectAll(".frame").each(function(b){d.set(this,b.some(a)),e.set(this,b)});var f=j.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,c){return b._getGroupOrder(e.get(a))-b._getGroupOrder(e.get(c))});k.utilsDom.sortChildren(c.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):a.tagName.localeCompare(b.tagName)}),l.utilsDraw.raiseElements(c,".dot",a)}};b.Point=o},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabels=void 0;var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=c(10),h=c(1),i=c(3),j=c(47),k=c(48),l=c(49),m=c(50),n=c(32),o=function(a,b,c,d,e,f,h,i){return g.utilsDraw.isIntersect(a,e,b,f,c,h,d,i)};b.LayerLabels=function(){function a(b,c,d,f){var g=f.width,h=f.height,j=f.container;e(this,a),this.container=j,this.model=b,this.flip=c,this.w=g,this.h=h,this.guide=i.utils.defaults(d||{},{fontFamily:"Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif",fontWeight:"normal",fontSize:10,fontColor:"#000",hideEqualLabels:!1,position:[],tickFormat:null,tickFormatNullAlias:""})}return f(a,[{key:"draw",value:function(a){var b=this,c=this.model,e=this.guide,f=j.LayerLabelsModel.seed(c,{fontSize:e.fontSize,fontColor:e.fontColor,flip:b.flip,formatter:n.FormatterRegistry.get(e.tickFormat,e.tickFormatNullAlias),labelRectSize:function(a){return h.utilsDom.getLabelSize(a,e)}}),g={maxWidth:b.w,maxHeight:b.h,data:a.reduce(function(a,b){return a.concat(b)},[])},i=e.position.filter(function(a){return a.indexOf("auto:")===-1}),l=i.map(k.LayerLabelsRules.getRule).reduce(function(a,b){return j.LayerLabelsModel.compose(a,b(a,g))},f),m=function(a,b){for(var c=a.length-1,d=[],e=0;e<=c;e++){var f=0===e?e:e-1,g=e,h=e===c?e:e+1;d.push(b(a[f],a[g],a[h]))}return d},o=a.reduce(function(a,b){var c=b.map(function(a){return{data:a,x:l.x(a)+l.dx(a),y:l.y(a)+l.dy(a),w:l.w(a),h:l.h(a,g),hide:l.hide(a),extr:null,size:l.model.size(a),angle:l.angle(a),label:l.label(a),color:l.color(a)}});return a.text=a.text.concat(c),a.edges=a.edges.concat(m(c,function(a,b,c){return b.y===Math.max(b.y,a.y,c.y)?b.extr="min":b.y===Math.min(b.y,a.y,c.y)?b.extr="max":b.extr="norm",{x0:a.x,x1:b.x,y0:a.y,y1:b.y}})),a},{text:[],edges:[]});o.text=o.text.filter(function(a){return a.label}).map(function(a,b){return Object.assign(a,{i:b})});var p=this.guide.position.filter(function(a){return 0===a.indexOf("auto:avoid")});o=o.text.length>0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b<c.length-1&&a.label===c[b+1].label}).forEach(function(a){return a.hide=!0});var z=this.container.selectAll(".i-role-label").data(r.map(function(a){return a.data}));return z.exit().remove(),z.call(y),z.enter().append("text").call(y),z}},{key:"autoPosition",value:function(a,b){var c=function(a,b){var c=4,d=2,e=c+(a.size+a.w)/2,f=d+(a.size+a.h)/2;return{x:e*Math.cos(b),y:f*Math.sin(b)}},d=a.edges,e=a.text.map(function(a){var b={max:-Math.PI/2,min:Math.PI/2,norm:Math.random()*Math.PI*2},d=c(a,b[a.extr]);return{i:a.i,x0:a.x,y0:a.y,x:a.x+d.x,y:a.y+d.y,w:a.w,h:a.h,size:a.size,hide:a.hide,extr:a.extr}}).filter(function(a){return!a.hide}),f=new l.AnnealingSimulator({items:e,transactor:function(a){var b=a.x,d=a.y;return{modify:function(){var b={max:-Math.PI,min:Math.PI,norm:2*Math.PI},d=4,e=b[a.extr],f=e/d+Math.random()*(e*(d-2))/d,g=c(a,f);return a.x=a.x0+g.x,a.y=a.y0+g.y,a},revert:function(){return a.x=b,a.y=d,a}}},penalties:b.map(function(a){return m.LayerLabelsPenalties.get(a)}).filter(function(a){return a}).map(function(a){return a(e,d)})}),g=f.start(5);return a.text=g.reduce(function(a,b){var c=a[b.i];return c.x=b.x,c.y=b.y,a},a.text),a}},{key:"hideOnLabelEdgesOverlap",value:function(a,b){var c=this,d=function(a,b){var d=c.getLabelRect(a);return b.reduce(function(a,b){var c=o(d.x0,d.x1,b.x0,b.x1,d.y0,d.y1,b.y0,b.y1),e=o(d.x0,d.x1,b.x0,b.x1,d.y1,d.y0,b.y0,b.y1);return a+2*(c+e)},0)};return a.filter(function(a){return!a.hide}).forEach(function(a){d(a,b)>0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.i!==f.i&&c(b,f)){b.hide=!0;break}}}),a}},{key:"adjustOnOverflow",value:function(a,b){var c=b.maxWidth,d=b.maxHeight;return a.map(function(a){return a.hide||(a.x=Math.min(Math.max(a.x,a.w/2),c-a.w/2),a.y=Math.max(Math.min(a.y,d-a.h/2),a.h/2)),a})}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(a){return function(){return a}};b.LayerLabelsModel=function(){function a(b){c(this,a),this.model=b.model,this.x=b.x||e(0),this.y=b.y||e(0),this.dx=b.dx||e(0),this.dy=b.dy||e(0),this.w=b.w||e(0),this.h=b.h||e(0),this.hide=b.hide||e(!1),this.label=b.label||e(""),this.color=b.color||e(""),this.angle=b.angle||e(0)}return d(a,null,[{key:"seed",value:function(b,c){var d=c.fontColor,e=c.flip,f=c.formatter,g=c.labelRectSize,h=c.paddingKoeff,i=void 0===h?.5:h,j=e?b.yi:b.xi,k=e?b.xi:b.yi,l=function(a){return f(b.label(a))};return new a({model:b,x:function(a){return j(a)},y:function(a){return k(a)},dy:function(a){return g(l(a)).height*i},w:function(a){return g(l(a)).width},h:function(a){\nreturn g(l(a)).height},label:l,color:function(){return d},angle:function(){return 0}})}},{key:"compose",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(47),g={},h=b.LayerLabelsRules=function(){function a(){d(this,a)}return e(a,null,[{key:"regRule",value:function(a,b){return g[a]=b,this}},{key:"getRule",value:function(a){return g[a]}}]),a}(),i=function(a,b,c){return c<b?Math.max(1,Math.floor(c*a.length/b))-1:a.length},j=function(a,b){return 0===b?"":a.slice(0,b).replace(/\\.+$/g,"")+"\u2026"},k=function(a,b){return a.discrete||!a.discrete&&b[a.dim]>=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b)<a.w(b)},e=c.reduce(function(a,b){return a+(d(b)?1:0)},0),f=e/c.length>.5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f<d.length?e:c}return c},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b){var c=void 0,d=void 0;0===a.angle(b)?(c=a.w(b),d=a.model.size(b)):(c=a.h(b),d=Math.abs(a.model.y0(b)-a.model.yi(b)));var e=a.label(b),f=i(e,c,d);return f<e.length?j(e,f):e},dy:function(b){var c=a.dy(b);if(0!==a.angle(b)){var d=a.h(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=a.label(b),g=i(f,d,e);return g<f.length?e*c/d:c}return c}}}).regRule("cut-outer-label-vertical",function(a){return{h:function(b,c){var d=a.h(b);if(Math.abs(a.angle(b))>0){var e=a.label(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=i(e,d,f);return g<e.length?f:d}return d},w:function(b){var c=a.w(b);if(0===a.angle(b)){var d=a.label(b),e=a.model.size(b),f=i(d,c,e);return f<d.length?e:c}return c},label:function(b,c){var d=void 0,e=void 0;0===a.angle(b)?(d=a.w(b),e=a.model.size(b)):(d=a.h(b),e=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b));var f=a.label(b),g=i(f,d,e);return g<f.length?j(f,g):f},dy:function(b,c){var d=a.dy(b);if(0!==a.angle(b)){var e=a.h(b),f=a.model.y0(b)<a.model.yi(b)?c.maxHeight-a.model.yi(b):a.model.yi(b),g=a.label(b),h=i(g,e,f);return h<g.length?f*d/e:d}return d}}}).regRule("from-beginning",function(a){var b=function(b){return a.model.y0(b)};return a.model.flip?{x:b}:{y:b}}).regRule("to-end",function(a){var b=function(b){return a.model.yi(b)};return a.model.flip?{x:b}:{y:b}}).regRule("towards",function(a){var b=function(a,b){return a.model.yi(b)-a.model.y0(b)>=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)<a.h(b)||a.hide(b)}}}).regRule("cut-label-horizontal",function(a){return{dx:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e),g=a.dx(b);return f<c.length?e*g/d:g},w:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?e:d},label:function(b){var c=a.label(b),d=a.w(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(c,d,e);return f<c.length?j(c,f):c}}}).regRule("cut-outer-label-horizontal",function(a,b){return{dx:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f),h=a.dx(c);return g<d.length?f*h/e:h},w:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?f:e},label:function(c){var d=a.label(c),e=a.w(c),f=a.model.y0(c)<a.model.yi(c)?b.maxWidth-a.model.yi(c):a.model.yi(c),g=i(d,e,f);return g<d.length?j(d,g):d}}}).regRule("keep-within-diameter-or-top",function(a){return{dy:function(b){return a.model.size(b)/a.w(b)<1?a.dy(b)-a.h(b)/2-a.model.size(b)/2:a.dy(b)}}}).regRule("keep-in-box",function(a,b){var c=b.maxWidth,d=b.maxHeight;return{dx:function e(b){var e=a.dx(b),d=a.x(b)+e,f=a.w(b),g=d-f/2,h=d+f/2,i=0-g;if(i>0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();b.AnnealingSimulator=function(){function a(b){c(this,a),this.minError=Number.MAX_VALUE,this.items=b.items,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}),this.penalties=b.penalties,this.transactor=b.transactor,this.cooling_schedule=b.cooling_schedule||function(a,b,c){return a-b/c}}return d(a,[{key:"energy",value:function(a){return this.penalties.reduce(function(b,c){return b+c(a)},0)}},{key:"move",value:function(a){var b=Math.floor(Math.random()*this.items.length),c=this.transactor(this.items[b]),d=this.energy(b);this.items[b]=c.modify();var e=this.energy(b),f=e-d,g=f<0?1:Math.exp(-f/a);Math.random()>=g?this.items[b]=c.revert():e<this.minError&&(this.minError=e,this.revision=this.items.map(function(a){return{i:a.i,x:a.x,y:a.y}}))}},{key:"start",value:function(a){var b=1,c=1,d=this.items.length;a:for(var e=0;e<a;e++){for(var f=0;f<d;f++)if(this.move(b),this.minError<=10)break a;b=this.cooling_schedule(b,c,a)}return this.revision}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsPenalties=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(10),g=function(a,b,c,d,e,g,h,i){return f.utilsDraw.isIntersect(a,e,b,g,c,h,d,i)},h={},i=b.LayerLabelsPenalties=function(){function a(){d(this,a)}return e(a,null,[{key:"reg",value:function(a,b){return h[a]=b,this}},{key:"get",value:function(a){return h[a]}}]),a}();i.reg("auto:avoid-label-label-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.BasePath=void 0;var g=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=c(46),i=c(22),j=c(9),k=c(3),l=c(1),m=c(10),n=c(2),o=d(n),p="taucharts_synthetic_record",q=function(a){return a[p]!==!0},r={grammarRuleFillGaps:function(a){var b=a.data(),c=k.utils.groupBy(b,a.group),d=Object.keys(c).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat([c[b]])},[]),e=a.scaleX.dim,g=a.scaleY.dim,h=a.scaleColor.dim,i=a.scaleSplit.dim,j=function(a){return a[g]>=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(a<d.left+h.x-i||a>d.right+h.x+i||b<d.top+h.y-i||b>d.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function e(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=1;c<a.length;c++)b.push(h(a[c-1],a[c]));return b.join(" ")}function f(a){if(0===a.length)return"";if(1===a.length)return g(a[0]);for(var b=[],c=3;c<a.length;c+=3)b.push(i(a[c-3],a[c-2],a[c-1],a[c]));return b.join(" ")}function g(a){var b=a.size/2;return["M"+a.x+","+(a.y-b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y+b),"A"+b+","+b+" 0 0 1",a.x+","+(a.y-b),"Z"].join(" ")}function h(a,b){var c=p(a,b);return c?["M"+c.left[0].x+","+c.left[0].y,"L"+c.left[1].x+","+c.left[1].y,"A"+b.size/2+","+b.size/2+" 0 "+Number(a.size<b.size)+" 1",c.right[1].x+","+c.right[1].y,"L"+c.right[0].x+","+c.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(a.size>b.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b<a&&(b+=2*Math.PI),b-a}function l(){for(var a=0,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];for(var e=1;e<c.length;e++)a+=Math.sqrt((c[e].x-c[e-1].x)*(c[e].x-c[e-1].x)+(c[e].y-c[e-1].y)*(c[e].y-c[e-1].y));return a}function m(a,b,c){return{x:a.x+b*Math.cos(c),y:a.y+b*Math.sin(c)}}function n(a,b,c,d,e){var f=(0,r.splitCubicSegment)(a,b,c,d,e),g=1/(1+l(f[3],f[4],f[5],f[6],f[3])/l(f[0],f[1],f[2],f[3],f[0]));return f[3].size=b.size*(1-g)+e.size*g,f}function o(a,b,c){var d=(0,r.getBezierPoint)(l(a,b)/l(a,b,c),a,c),e=(0,r.getBezierPoint)(2,d,b);return[a,e,c]}function p(a,b){var c=l(a,b);if(0===c||c+a.size/2<=b.size/2||c+b.size/2<=a.size/2)return null;var d=j(a,b),e=Math.asin((a.size-b.size)/c/2),f=d-Math.PI/2+e,g=d+Math.PI/2-e;return{left:[m(a,a.size/2,f),m(b,b.size/2,f)],right:[m(a,a.size/2,g),m(b,b.size/2,g)]}}function q(a,b,c,e){var f=l(a,e);if(0===f||f+a.size/2<=e.size/2||f+e.size/2<=a.size/2)return null;var g=1/12,h=function(f){var h=f?[e,c,b,a]:[a,b,c,e],i=n.apply(void 0,[2*g].concat(h)),j=n.apply(void 0,[.5].concat(d(i.slice(0,4)))),k=j[3],l=j[6],m=p(h[0],k),q=p(k,l),s=[m.left[0],(0,r.getBezierPoint)(.5,m.left[1],q.left[0]),q.left[1]],t=[m.right[0],(0,r.getBezierPoint)(.5,m.right[1],q.right[0]),q.right[1]],u=o.apply(void 0,s)[1],v=o.apply(void 0,t)[1],w=(0,r.getBezierPoint)(1/3/g,m.left[0],u),x=(0,r.getBezierPoint)(1/3/g,m.right[0],v);return{left:f?[x,t[0]]:[s[0],w],right:f?[w,s[0]]:[t[0],x]}},i=h(!1),j=h(!0);return{left:[].concat(d(i.left),d(j.left)),right:[].concat(d(i.right),d(j.right))}}Object.defineProperty(b,"__esModule",{value:!0}),b.getBrushLine=e,b.getBrushCurve=f;var r=c(12)},function(a,b){"use strict";function c(a){if(a.length<2)return"";for(var b="",c=0;c<a.length;c++)b+=""+(0===c?"M":" L")+a[c].x+","+a[c].y;return b}function d(a){\nif(a.length<4)return"";for(var b="M"+a[0].x+","+a[0].y,c=3;c<a.length;c+=3)b+=" C"+a[c-2].x+","+a[c-2].y+" "+a[c-1].x+","+a[c-1].y+" "+a[c].x+","+a[c].y;return b}Object.defineProperty(b,"__esModule",{value:!0}),b.getPolyline=c,b.getCurve=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}Object.defineProperty(b,"__esModule",{value:!0}),b.Interval=void 0;var f=c(22),g=c(7),h=c(46),i=c(9),j=c(3),k=c(1),l=c(10),m=c(2),n=d(m),o=function(a){return n["default"].select(a).data()[0]},p={init:function(a){var b=Object.assign({},a);b.guide=b.guide||{},b.guide=j.utils.defaults(b.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=b.guide.enableColorToBarPosition?b.guide.enableColorToBarPosition:!b.stack}),b.guide.size=j.utils.defaults(b.guide.size||{},{enableDistributeEvenly:!0}),b.guide.label=j.utils.defaults(b.guide.label||{},{position:b.flip?b.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:b.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var c=b.guide.avoidScalesOverflow,d=b.guide.enableColorToBarPosition,e=b.guide.size.enableDistributeEvenly;return b.transformRules=[b.flip&&g.GrammarRegistry.get("flip"),b.stack&&g.GrammarRegistry.get("stack"),d&&g.GrammarRegistry.get("positioningByColor")].filter(function(a){return a}),b.adjustRules=[e&&function(a,c){var d=j.utils.defaults(b.guide.size||{},{defMinSize:b.guide.prettify?3:0,defMaxSize:b.guide.prettify?40:Number.MAX_VALUE}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return g.GrammarRegistry.get("size_distribute_evenly")(a,e)},c&&e&&function(a,b){var c=Object.assign({},b,{sizeDirection:"x"});return g.GrammarRegistry.get("avoidScalesOverflow")(a,c)},b.stack&&g.GrammarRegistry.get("adjustYScale")].filter(function(a){return a}),b},addInteraction:function(){var a=this,b=this.node(),c=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("data-hover",function(b,d){return a.highlight(c(d.data,null))})},draw:function(){var a,b,c=this.node(),d=c.config,g=d.options;g.container=g.slot(d.uid);var k=d.guide.prettify,l="i-role-element i-role-datum bar "+f.CSS_PREFIX+"bar",m=c.screenModel,p=this.buildModel(m,{prettify:k,minBarH:1,minBarW:1,baseCssClass:l}),q=i.d3_animationInterceptor,r=d.flip?"y":"x",s=d.flip?"x":"y",t=d.flip?"width":"height",u=d.flip?"height":"width",v=m.toFibers(),w=v.reduce(function(a,b){return a.concat(b)},[]),x=p["class"],y=j.utils.omit(p,"class"),z=g.container.selectAll(".bar").data(w,m.id);z.exit().classed("tau-removing",!0).call(q(d.guide.animationSpeed,null,(a={},e(a,r,function(){var a=n["default"].select(this),b=a.attr(r)-0,c=a.attr(u)-0;return b+c/2}),e(a,s,function(){return this.getAttribute("data-zero")}),e(a,u,0),e(a,t,0),a),function(a){var b=n["default"].select(a);b.classed("tau-removing")&&b.remove()})),z.call(q(d.guide.animationSpeed,null,y)).attr("class",x).attr("data-zero",m[s+"0"]),z.enter().append("rect").call(q(d.guide.animationSpeed,(b={},e(b,s,m[s+"0"]),e(b,t,0),b),y)).attr("class",x).attr("data-zero",m[s+"0"]),c.subscribe(new h.LayerLabels(m.model,m.model.flip,d.guide.label,g).draw(v));var A=function(a,b){var c=o(a),d=o(b),e=p.width(c),f=p.width(d);if(e===f){var g=p.y(c),h=p.y(d);return g===h?C(a,b):g-h}return f-e},B=function(a,b){var c=o(a),d=o(b),e=p.height(c),f=p.height(d);if(e===f){var g=p.x(c),h=p.x(d);return g===h?C(a,b):g-h}return f-e},C=function(){var a=w.reduce(function(a,b,c){return a.set(b,c+1),a},new Map);return function(b,c){var d=a.get(o(b))||-1,e=a.get(o(c))||-1;return d-e}}();this._barsSorter=d.guide.sortByBarHeight?d.flip?A:B:C;var D={rect:0,text:1};this._typeSorter=function(a,b){return D[a.tagName]-D[b.tagName]},this._sortElements(this._typeSorter,this._barsSorter),c.subscribe(z),this._boundsInfo=this._getBoundsInfo(z[0])},buildModel:function(a,b){var c,d=b.prettify,e=b.minBarH,f=b.minBarW,g=b.baseCssClass,h=function(b){var c=a.size(b);return d&&(c=Math.max(f,c)),c},i=function(b){return b[a.model.scaleY.dim]};if(a.flip){var j=function(b){return Math.abs(a.x(b)-a.x0(b))};c={y:function(b){return a.y(b)-.5*h(b)},x:function l(b){var l=Math.min(a.x0(b),a.x(b));if(d){var c=j(b),f=i(b),g=0;0===f&&(g=0),f>0&&(g=c),f<0&&(g=0-e);var h=c<e;return h?l+g:l}return l},height:function(a){return h(a)},width:function(a){var b=j(a);return d?0===i(a)?b:Math.max(e,b):b}}}else{var k=function(b){return Math.abs(a.y(b)-a.y0(b))};c={x:function(b){return a.x(b)-.5*h(b)},y:function m(b){var m=Math.min(a.y0(b),a.y(b));if(d){var c=k(b),f=c<e;m=f&&i(b)>0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(i<d.left-k||i>d.right+k||j<d.top-k||j>d.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(22),j=c(5),k=c(3),l=c(2),m=d(l);b.ParallelLine=function(a){function b(a){e(this,b);var c=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.config=a,c.config.guide=k.utils.defaults(c.config.guide||{},{}),c.on("highlight",function(a,b){return c.highlight(b)}),c}return g(b,a),h(b,[{key:"defineGrammarModel",value:function(a){var b=this.config,c=b.options;this.color=a("color",b.color,{}),this.scalesMap=b.columns.reduce(function(b,d){return b[d]=a("pos",d,[c.height,0]),b},{});var d=c.width/(b.columns.length-1),e=b.columns.reduce(function(a,b,c){return a[b]=c*d,a},{});return this.xBase=function(a){return e[a]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}}},{key:"drawFrames",value:function(a){var b=this.config,c=this.config.options,d=this.scalesMap,e=this.xBase,f=this.color,g=m["default"].svg.line(),h=function(){this.attr({d:function(a){return g(b.columns.map(function(b){return[e(b),d[b](a[d[b].dim])]}))}})},j=function(){this.attr({stroke:function(a){return f.toColor(f(a[f.dim]))},"class":function(a){return i.CSS_PREFIX+"__line line "+f.toClass(f(a[f.dim]))+" foreground"}})},k=function(){var a=this.selectAll(".background").data(function(a){return a.part()});a.exit().remove(),a.call(h),a.enter().append("path").attr("class","background line").call(h);var b=this.selectAll(".foreground").data(function(a){return a.part()});b.exit().remove(),b.call(function(){h.call(this),j.call(this)}),b.enter().append("path").call(function(){h.call(this),j.call(this)})},l=c.container.selectAll(".lines-frame").data(a,function(a){return a.hash()});l.exit().remove(),l.call(k),l.enter().append("g").attr("class","lines-frame").call(k),this.subscribe(c.container.selectAll(".lines-frame .foreground"))}},{key:"highlight",value:function(a){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(b){return a(b)?"":"hidden"})}}]),b}(j.Element)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.IdentityScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.IdentityScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f._references=c.references,f._refCounter=c.refCounter,f.addField("scaleType","identity"),f}return f(b,a),g(b,[{key:"create",value:function(){var a=this._references,b=this._refCounter;return this.toBaseScale(function(c,d){if(null==c){var e=a.get(d);null==e&&(e=b(),a.set(d,e))}else e=c;return e})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.BaseScale=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(3),g=function(a){return"date"===a?function(a){return new Date(a).getTime()}:function(a){return a}},h=function(a,b){return f.utils.generateHash([a,b].map(JSON.stringify).join(""))};b.BaseScale=function(){function a(b,c){var e=this;d(this,a),this._fields={};var g;if(Array.isArray(c.fitToFrameByDims)&&c.fitToFrameByDims.length){var h=function(a){var b={};return"where"===a.type&&a.args?(b.type=a.type,b.args=c.fitToFrameByDims.reduce(function(b,c){return a.args.hasOwnProperty(c)&&(b[c]=a.args[c]),b},{})):b=a,b};g=b.part(h)}else g=b.full();var i=this.getVarSet(g,c);c.order&&(i=f.utils.union(f.utils.intersection(c.order,i),i)),this.vars=i;var j=i.map(function(a){return a});this.scaleConfig=c,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return e.vars}).addField("isInteger",j.every(Number.isInteger)).addField("originalSeries",function(){return j}).addField("isContains",function(a){return e.isInDomain(a)}).addField("isEmptyScale",function(a){return e.isEmpty(a)}).addField("fixup",function(a){var b=e.scaleConfig;b.__fixup__=b.__fixup__||{},b.__fixup__=Object.assign(b.__fixup__,a(Object.assign({},b,b.__fixup__)))}).addField("commit",function(){e.scaleConfig=Object.assign(e.scaleConfig,e.scaleConfig.__fixup__),delete e.scaleConfig.__fixup__})}return e(a,[{key:"isInDomain",value:function(a){return this.domain().indexOf(a)>=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ColorScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.ColorScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h="measure"!==c.dimType,i=d.scaleConfig.brewer||(h?k.utils.range(20).map(function(a){return"color20-"+(1+a)}):["#eee","#000"]),j=d.scaleConfig;if(!h){var l=m["default"].extent(d.vars),n=function(a){return Number.isFinite(a)||k.utils.isDate(a)},o=n(j.min)?j.min:l[0],p=n(j.max)?j.max:l[1],q=[o,l[0]].filter(n),r=[p,l[1]].filter(n);if(l=[q.sort(function(a,b){return a-b})[0],r.sort(function(a,b){return b-a})[0]],j.nice&&l[0]<0&&l[1]>0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.SizeScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l),n={sqrt:function(a){return Math.sqrt(a)},linear:function(a){return a}};b.SizeScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],k=Number.isFinite(h.max)?h.max:i[1];return d.vars=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([k,i[1]].filter(Number.isFinite)))],d.addField("scaleType","size"),d.addField("funcType",c.func||"sqrt"),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain().sort(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.OrdinalScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(2),m=d(l);b.OrdinalScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return d.addField("scaleType","ordinal").addField("discrete",!0),d}return h(b,a),j(b,[{key:"create",value:function(a){var b=this.scaleConfig,c=this.vars,d=m["default"].scale.ordinal().domain(c),f=d.rangePoints(a,1),g=Math.max.apply(Math,e(a)),h=function(a){var d=i(b.ratio);return"function"===d?b.ratio(a,g,c):"object"===d?b.ratio[a]:1/c.length},j=function(a){var d;return d=b.ratio?g-c.slice(c.indexOf(a)+1).reduce(function(a,b){return a+g*h(b)},g*h(a)*.5):f(a)};return Object.keys(f).forEach(function(a){return j[a]=f[a]}),j.stepSize=function(a){return h(a)*g},this.toBaseScale(j,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.PeriodScale=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),k=c(62),l=c(18),m=c(3),n=c(2),o=d(n);b.PeriodScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),e=d.scaleConfig,h=d.vars,i=o["default"].extent(h),j=null===e.min||void 0===e.min?i[0]:new Date(e.min).getTime(),k=null===e.max||void 0===e.max?i[1]:new Date(e.max).getTime(),n=[new Date(Math.min(j,i[0])),new Date(Math.max(k,i[1]))],p=l.UnitDomainPeriodGenerator.get(e.period,{utc:e.utcTime});return e.fitToFrameByDims||null===p?d.vars=m.utils.unique(h.map(function(a){return new Date(a)}),function(a){return a.getTime()}).sort(function(a,b){return b-a}):d.vars=l.UnitDomainPeriodGenerator.generate(n[0],n[1],e.period,{utc:e.utcTime}),d.addField("scaleType","period").addField("period",d.scaleConfig.period).addField("discrete",!0),d}return h(b,a),j(b,[{key:"isInDomain",value:function(a){var b=l.UnitDomainPeriodGenerator.get(this.scaleConfig.period,{utc:this.scaleConfig.utcTime}),c=b.cast(new Date(a)).getTime();return this.domain().map(function(a){return a.getTime()}).indexOf(c)>=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(2),k=d(j),l=c(3);b.TimeScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=d.vars,i=k["default"].extent(h).map(function(a){return new Date(a)}),j=null===g.min||void 0===g.min?i[0]:new Date(g.min).getTime(),m=null===g.max||void 0===g.max?i[1]:new Date(g.max).getTime();if(h=[new Date(Math.min(j,i[0])),new Date(Math.max(m,i[1]))],d.niceIntervalFn=null,g.nice){var n=g.niceInterval,o=n&&k["default"].time[n]?g.utcTime?k["default"].time[n].utc:k["default"].time[n]:null;o?d.niceIntervalFn=o:d.niceIntervalFn=null,d.vars=l.utils.niceTimeDomain(h,d.niceIntervalFn,{utc:g.utcTime})}else d.vars=h;return d.addField("scaleType","time"),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=new Date(a),c=this.domain(),d=c[0],e=c[c.length-1];return!Number.isNaN(d)&&!Number.isNaN(e)&&b<=e&&b>=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a<c&&(a=c),f(new Date(a))};return Object.keys(f).forEach(function(a){return g[a]=f[a]}),g.stepSize=function(){return 0},this.toBaseScale(g,a)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.LinearScale=void 0;var i=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),j=c(62),k=c(3),l=c(2),m=d(l);b.LinearScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=m["default"].extent(d.vars),j=Number.isFinite(h.min)?h.min:i[0],l=Number.isFinite(h.max)?h.max:i[1];if(i=[Math.min.apply(Math,e([j,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([l,i[1]].filter(Number.isFinite)))],d.vars=h.nice?k.utils.niceZeroBased(i):m["default"].extent(i),d.vars[0]===d.vars[1]){var n=Math.pow(10,Math.floor(Math.log(d.vars[0])/Math.LN10));d.vars[0]-=n,d.vars[1]+=n||10}return d.addField("scaleType","linear").addField("discrete",!1),d}return h(b,a),i(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function i(a){return Math.log(a)/Math.LN10}function j(a){if(a[0]*a[1]<=0)throw new o.TauChartError("Logarithmic scale domain cannot cross zero.",o.errorCodes.INVALID_LOG_DOMAIN)}function k(a){var b=a.copy;return a.ticks=function(b){for(var c=10,d=[],e=q["default"].extent(a.domain()),f=Math.floor(i(e[0])),g=Math.ceil(i(e[1])),h=Math.ceil((g-f)*c/(Math.ceil(b/c)*c)),j=f;j<=g;j+=h)for(var k=1;k<=c;k++){var l=Math.pow(k,h)*Math.pow(10,j);l=parseFloat(l.toExponential(0)),l>=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),n=c(62),o=c(8),p=c(2),q=d(p);\nb.LogarithmicScale=function(a){function b(a,c){f(this,b);var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),h=d.scaleConfig,i=q["default"].extent(d.vars),k=Number.isFinite(h.min)?h.min:i[0],m=Number.isFinite(h.max)?h.max:i[1];return i=[Math.min.apply(Math,e([k,i[0]].filter(Number.isFinite))),Math.max.apply(Math,e([m,i[1]].filter(Number.isFinite)))],j(i),h.nice&&(i=l(i)),d.vars=i,d.addField("scaleType","logarithmic").addField("discrete",!1),d}return h(b,a),m(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),h=c(62);b.ValueScale=function(a){function b(a,c){d(this,b);var f=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c));return f.addField("scaleType","value").addField("georole",c.georole),f}return f(b,a),g(b,[{key:"create",value:function(){return this.toBaseScale(function(a){return a})}}]),b}(h.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.FillScale=void 0;var h=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),i=c(62),j=c(3),k=c(2),l=d(k);b.FillScale=function(a){function b(a,c){e(this,b);var d=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c)),g=d.scaleConfig,h=l["default"].extent(d.vars),i=Number.isFinite(g.min)?g.min:h[0],k=Number.isFinite(g.max)?g.max:h[1];h=[Math.min(i,h[0]),Math.max(k,h[1])],d.vars=g.nice?j.utils.niceZeroBased(h):l["default"].extent(h);var m=.8/9,n=j.utils.range(10).map(function(a){return"rgba(90,180,90,"+(.2+a*m).toFixed(2)+")"}),o=g.brewer||n;return d.addField("scaleType","fill").addField("brewer",o),d}return g(b,a),h(b,[{key:"isInDomain",value:function(a){var b=this.domain(),c=b[0],d=b[b.length-1];return!Number.isNaN(c)&&!Number.isNaN(d)&&a<=d&&a>=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push(\'There is more than one measure dimension for "\'+c+\'" axis\'))):(b.status=m.FAIL,d?b.messages.push(\'"\'+d+\'" dimension is undefined for "\'+c+\'" axis\'):b.messages.push(\'"\'+c+\'" axis should be specified\')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h<g;h++)f.push({});f=f.slice(0,d);var i=e(a.dimensions,b,"x"),j=e(a.dimensions,c,"y");return b=n[i.status](b,i,f),c=n[j.status](c,j,f),Object.assign({},a,{x:b,y:c,guide:f})}function g(a,b){for(var c=b.x,d=b.y,e=b.guide,f=Math.max(c.length,d.length),g={type:"COORDS.RECT",unit:[]},h=[].concat(c),k=[].concat(d),m=[].concat(e),n=f;n>0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(32),g=c(80),h=c(81),i={},j=function(){function a(){d(this,a)}return e(a,null,[{key:"unit",value:function(a){return new g.Unit(a)}},{key:"spec",value:function(a){return new h.Spec(a)}},{key:"cloneObject",value:function(a){return JSON.parse(JSON.stringify(a))}},{key:"depthFirstSearch",value:function(b,c){if(c(b))return b;for(var d=b.hasOwnProperty("frames")?b.frames:[{units:b.units}],e=0;e<d.length;e++)for(var f=d[e].units||[],g=0;g<f.length;g++){var h=a.depthFirstSearch(f[g],c);if(h)return h}}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c){b(a,c),(a.units||[]).map(function(c){return d(c,b,a)})};c(a.unit,b,null)}},{key:"extractFieldsFormatInfo",value:function(b){var c=b.scales,d=function(a){return!c[a].dim},e=function(a,b,d){var e=b.guide||{},f=c[b[d]],g=e[d]||{};a[f.dim]=a[f.dim]||{label:[],format:[],nullAlias:[],tickLabel:[]};var h=g.label,i=g.label||{};a[f.dim].label.push("string"==typeof h?h:i._original_text||i.text);var j=g.tickFormat||g.tickPeriod;a[f.dim].format.push(j),a[f.dim].nullAlias.push(g.tickFormatNullAlias),a[f.dim].tickLabel.push(g.tickLabel)},g=[];a.traverseSpec(b,function(a){g.push(a)});var h=g.reduce(function(a,b){return"COORDS.RECT"===b.type&&b.hasOwnProperty("x")&&!d(b.x)&&e(a,b,"x"),"COORDS.RECT"===b.type&&b.hasOwnProperty("y")&&!d(b.y)&&e(a,b,"y"),b.hasOwnProperty("color")&&!d(b.color)&&e(a,b,"color"),b.hasOwnProperty("size")&&!d(b.size)&&e(a,b,"size"),b.hasOwnProperty("label")&&!d(b.label)&&e(a,b,"label"),a},{}),i=function(a,b){return a.filter(function(a){return a})[0]||b};return Object.keys(h).reduce(function(a,c){a[c].label=i(a[c].label,c),a[c].format=i(a[c].format,null),a[c].nullAlias=i(a[c].nullAlias,"No "+a[c].label),a[c].tickLabel=i(a[c].tickLabel,null);var d="x-time-auto"===a[c].format?b.settings.utcTime?"day-utc":"day":a[c].format,e=a[c].nullAlias,g=d?f.FormatterRegistry.get(d,e):function(a){return null===a?e:a};if(a[c].format=g,a[c].tickLabel){var h=c.replace("."+a[c].tickLabel,"");a[h]={label:a[c].label,nullAlias:a[c].nullAlias,tickLabel:a[c].tickLabel,format:function(b){return g(b&&b[a[h].tickLabel])},isComplexField:!0},a[c].parentField=h}return a},h)}},{key:"tokens",value:function(){return{reg:function(a,b){return i[a]=b,this},get:function(a){return i[a]||a}}}},{key:"getParentUnit",value:function(a,b){var c=null,d=function e(a,d){return a.uid===b.uid?(c=d,!0):(a.frames?a.frames.some(function(b){return(b.units||[]).some(function(b){return e(b,a)})}):(a.units||[]).some(function(b){return e(b,a)}),!1)};return d(a.unit,null),c}}]),a}();b.PluginsSDK=j},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function(){function a(b){c(this,a),this.unitRef=b}return d(a,[{key:"value",value:function(){return this.unitRef}},{key:"clone",value:function(){return JSON.parse(JSON.stringify(this.unitRef))}},{key:"traverse",value:function(a){var b=function c(a,b,d){b(a,d),(a.units||[]).map(function(d){return c(d,b,a)})};return b(this.unitRef,a,null),this}},{key:"reduce",value:function(a,b){var c=b;return this.traverse(function(b,d){return c=a(c,b,d)}),c}},{key:"addFrame",value:function(a){return this.unitRef.frames=this.unitRef.frames||[],a.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),a.source=a.hasOwnProperty("source")?a.source:this.unitRef.expression.source,a.pipe=a.pipe||[],this.unitRef.frames.push(a),this}},{key:"addTransformation",value:function(a,b){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:a,args:b}),this}},{key:"isCoordinates",value:function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")}},{key:"isElementOf",value:function(a){if(this.isCoordinates())return!1;var b=this.unitRef.type||"",c=b.split("/");return 1===c.length&&c.unshift("RECT"),c[0].toUpperCase()===a.toUpperCase()}}]),a}();b.Unit=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.Spec=void 0;var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=c(80),g=function(){function a(b){d(this,a),this.specRef=b}return e(a,[{key:"value",value:function(){return this.specRef}},{key:"unit",value:function(a){return a&&(this.specRef.unit=a),new f.Unit(this.specRef.unit)}},{key:"addTransformation",value:function(a,b){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[a]=b,this}},{key:"getSettings",value:function(a){return this.specRef.settings[a]}},{key:"setSettings",value:function(a,b){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[a]=b,this}},{key:"getScale",value:function(a){return this.specRef.scales[a]}},{key:"addScale",value:function(a,b){return this.specRef.scales[a]=b,this}},{key:"regSource",value:function(a,b){return this.specRef.sources[a]=b,this}},{key:"getSourceData",value:function(a){var b=this.specRef.sources[a]||{data:[]};return b.data}},{key:"getSourceDim",value:function(a,b){var c=this.specRef.sources[a]||{dims:{}};return c.dims[b]||{}}}]),a}();b.Spec=g},function(a,b){"use strict";if(window.requestAnimationFrame||!function(){var a=0;window.requestAnimationFrame=function(b){var c=Date.now(),d=Math.max(0,16-c+a);return a=c+d,setTimeout(function(){b.call(null,c+d)},d)},window.cancelAnimationFrame=function(a){clearTimeout(a)}}(),Number.isFinite||Object.defineProperty(Number,"isFinite",{value:function(a){return"number"==typeof a&&isFinite(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isNaN||Object.defineProperty(Number,"isNaN",{value:function(a){return"number"==typeof a&&isNaN(a)},configurable:!0,enumerable:!1,writable:!0}),Number.isInteger||Object.defineProperty(Number,"isInteger",{value:function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a},configurable:!0,enumerable:!1,writable:!0}),Number.MAX_SAFE_INTEGER||Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:9007199254740991,configurable:!1,enumerable:!1,writable:!1}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function d(a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var d,b=Object(this),c=b.length>>>0,e=arguments[1],f=0;f<c;f++)if(d=b[f],a.call(e,d,f,b))return d},configurable:!0,enumerable:!1,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function e(a){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var e,b=Object(this),c=b.length>>>0,d=arguments[1],f=0;f<c;f++)if(e=b[f],a.call(d,e,f,b))return f;return-1},configurable:!0,enumerable:!1,writable:!0}),!Array.from){Object.defineProperty(Array,"from",{value:function(){var a=Object.prototype.toString,b=function(b){return"function"==typeof b||"[object Function]"===a.call(b)},c=function(a){var b=Number(a);return isNaN(b)?0:0!==b&&isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;k<i;)h=d[k],g?j[k]="undefined"==typeof f?g(h,k):g.call(f,h,k):j[k]=h,k+=1;return j.length=i,j}}(),configurable:!0,enumerable:!1,writable:!0});var c=Map.prototype.set;Object.defineProperty(Map.prototype,"set",{value:function(){return c.apply(this,arguments),this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"values",{value:function(){var a={},b=0;return this.forEach(function(c){return a[String(b++)]=c}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(Map.prototype,"entries",{value:function(){var a={},b=0;return this.forEach(function(c,d){return a[String(b++)]=[d,c]}),a.length=b,a},configurable:!0,enumerable:!1,writable:!0})}Object.assign||Object.defineProperty(Object,"assign",{value:function(a){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(void 0!==d&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b},configurable:!0,enumerable:!1,writable:!0}),Element.prototype.matches||Object.defineProperty(Element.prototype,"matches",{value:Element.prototype.msMatchesSelector,configurable:!0,enumerable:!0,writable:!0})}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],\n5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=c.defaults(b||{},{items:[]}),i="annotation_text";return{init:function(b){this._chart=b;var c=b.getSpec();c.scales[i]={type:"value",dim:"text",source:"?"},c.transformations=c.transformations||{},c.transformations.dataRange=function(d,e){var f=e.from,g=e.to,h=b.getScaleInfo(e.primaryScale);if("period"===h.scaleType){var i=a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime});f=i.cast(new Date(e.from)),g=i.cast(new Date(e.to))}var j=!h.isInDomain(f),k=!h.isInDomain(g),l=h.discrete?j||k:j&&k;if(l)return console.log("Annotation is out of domain"),[];var m=b.getScaleInfo(e.secondaryScale),n=m.domain(),o=[n[0],n[n.length-1]],p=h.dim,q=m.dim,r="__pos__",s={},t={},u={},v={};return s[r]="l",s[p]=f,s[q]=o[0],t[r]="l",t[p]=g,t[q]=o[0],u[r]="r",u[p]=g,u[q]=o[1],v[r]="r",v[p]=f,v[q]=o[1],("y"===e.axis?u:v).text=e.text,[s,t,u,v]},c.transformations.dataLimit=function(d,e){var f=e.primaryScale,g=e.secondaryScale,h=b.getScaleInfo(f),i="period"===h.scaleType?a.api.tickPeriod.get(h.period,{utc:c.settings.utcTime}).cast(new Date(e.from)):e.from,j=!h.isInDomain(i);if(j)return console.log("Annotation is out of domain"),[];var k=b.getScaleInfo(g),l=k.domain(),m=[l[0],l[l.length-1]],n={},o={},p=h.dim,q=k.dim,r="__pos__";return n[p]=i,n[q]=m[0],n[r]="l",o[p]=i,o[q]=m[1],o[r]="r",o.text=e.text,[n,o]}},addAreaNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any data field");var j=c.val[0],k=c.val[1],l={type:"ELEMENT.PATH",namespace:"annotations",x:b.x,y:b.y,color:c.colorScaleName,label:i,expression:{inherit:!1,operator:"none",params:[],source:"/"},transformModel:[g(c)],transformation:[{type:"dataRange",args:{axis:h[0],text:c.text,from:j,to:k,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",cssClass:"graphical-report__annotation-area",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},addLineNote:function(a,b,c){var d=a.scales[b.x],e=a.scales[b.y],h=c.dim===d.dim?["x","y"]:c.dim===e.dim?["y","x"]:null;if(null===h)return void console.log("Annotation doesn\'t match any field");var j=c.text,k=c.val,l={type:"ELEMENT.LINE",namespace:"annotations",x:b.x,y:b.y,label:i,color:c.colorScaleName,transformModel:[g(c)],expression:{inherit:!1,operator:"none",params:[],source:"/"},transformation:[{type:"dataLimit",args:{from:k,text:j,primaryScale:b[h[0]],secondaryScale:b[h[1]]}}],guide:{showAnchors:"never",widthCssClass:"graphical-report__line-width-2",cssClass:"graphical-report__annotation-line",label:{fontColor:c.color,position:["r","b","keep-in-box"]}}};f(b.units,l,c.position)},onSpecReady:function(a,b){var c=this,f=[];a.traverseSpec(b,function(a){a&&"COORDS.RECT"===a.type&&a.units&&f.push(a)});var g=e.spec(b);f.forEach(function(a){h.items.map(function(a,b){var c=(a.color||"#BD10E0").toLowerCase(),e=d.rgb(c).toString().toUpperCase();"black"!==c&&"#000000"===e&&(e=null);var f=e||c,h="annotation_color_"+b;return g.addScale(h,{type:"color",source:"?",brewer:[f]}),{dim:a.dim,val:a.val,text:a.text,color:f,position:a.position,colorScaleName:h}}).forEach(function(d){Array.isArray(d.val)?c.addAreaNote(b,a,d):c.addLineNote(b,a,d)})})}}}var c=a.api.utils,d=a.api.d3,e=a.api.pluginsSDK,f=function(a,b,c){"front"===c?a.push(b):a.unshift(b)},g=function(a){return function(b){var c={},d=[{dim:b.scaleX.dim,scale:b.scaleY,method:"yi",k:-1},{dim:b.scaleY.dim,scale:b.scaleX,method:"xi",k:1},{dim:null,scale:null,method:null}].find(function(b){return b.dim===a.dim});if(null===d.method)return c;var e="__pos__",f=d.k,g={l:-.5,r:.5},h=d.method,i=d.scale;return c[h]=function(a){var c=(g[a[e]]||0)*f;return i.discrete?b[h](a)+i.stepSize(a[i.dim])*c:b[h](a)},c}};return a.api.plugins.add("annotations",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=a.x0,d=a.y0,e=null==a.collapse||a.collapse,f=function(a){return{y0:function(c){return a.scaleY.value(c[b])}}},g=function(a){return{y0:function(b){return a.scaleY.value(b[d])}}},h=function(a){var c=a.data();if(0===c.length)return{};var e=a.scaleY,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h=a.flip?b:d,i=e.dim;return c.forEach(function(a){var b=a[h],c=a[i],d=b<c?b:c,e=c>b?c:b;f=d<f?d:f,g=e>g?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.max<g)&&(b.max=g),(!a.hasOwnProperty("min")||a.min>f)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(q<k){m=q;break}}return c[d.MIN]=l,c[d.MAX]=m,c[d.MEDIAN]=g.value,c[d.Q1]=f.value,c[d.Q3]=h.value,c}function d(a){return a=e.defaults(a||{},{mode:"outliers-only"}),{init:function(a){this._chart=a},onSpecReady:function(b,d){var e=a.flip===!0;d.transformations=d.transformations||{},d.transformations.empty=function(){return[]},d.transformations.outliers=function(a,b){var d=b.x.dim,e=b.y.dim,f=a.reduce(function(a,b){var c=b[d];return a[c]=a[c]||[],a[c].push(b[e]),a},{}),g=Object.keys(f).reduce(function(a,b){var g=c(f[b],{},k),h=g[k.MAX],i=g[k.MIN];return a.concat(function(a){return a[d]!==b||(a[e]>h||a[e]<i)})},[]);return a.filter(function(a){var b=g.some(function(b){return!b(a)});return!b})},b.traverseSpec(d,function(b,c){if("ELEMENT.POINT"===b.type){var f=JSON.parse(JSON.stringify(b));f.type="ELEMENT.BOX-WHISKERS",f.flip=e,f.namespace="boxwhiskers",f.guide=f.guide||{},f.guide.fitScale="hide-scatter"===a.mode;var g={"show-scatter":[],"hide-scatter":[{type:"empty"}],"outliers-only":[{type:"outliers",args:{x:d.scales[e?b.y:b.x],y:d.scales[e?b.x:b.y]}}]};b.transformation=b.transformation||[],b.transformation=b.transformation.concat(g[a.mode]),c.units.push(f)}})}}}var e=a.api.utils,f="minimum",g="maximum",h="median",i="Q1",j="Q3",k={MIN:f,MAX:g,MEDIAN:h,Q1:i,Q3:j};return a.api.unitsRegistry.reg("ELEMENT.BOX-WHISKERS",{getAdjustScalesRules:function(){var a=this,b=a.node(),c=[];return b.config.guide.fitScale&&c.push(function(b){a.fixScale(b,a.calcStat(b))}),c},fixScale:function(a,b){var c=b.reduce(function(a,b){return a.concat([b[k.MIN],b[k.MAX]])},[]).sort(function(a,b){return a-b}),d=c[0],e=c[c.length-1];a.scaleY.fixup(function(a){var b={};if(a.hasOwnProperty("series")){var c=Math.min(a.series[0],d),f=Math.max(a.series[1],e);b.series=[c,f]}else b.series=[d,e];return b})},calcStat:function(a){var b=a.data().reduce(function(b,c){var d=c[a.scaleX.dim];return b[d]=b[d]||[],b[d].push(c[a.scaleY.dim]),b},{});return Object.keys(b).reduce(function(d,e){var f={};return f[a.scaleX.dim]=e,d.concat(c(b[e],f,k))},[])},buildRangeModel:function(a,b){var c=a.flip,d=c?"y":"x",e=c?"x":"y",f=c?"height":"width",g=c?"width":"height",h=c?b.y1:b.y0,i=c?b.y0:b.y1,j=b.size,k=a.model.scaleX,l=a.model.scaleY,m={"class":b["class"]};return m[d]=function(a){return k(a[k.dim])-.5*j},m[e]=function(a){return l(a[i])},m[f]=function(){return j},m[g]=function(a){return Math.max(b.minHeight||1,Math.abs(l(a[h])-l(a[i])))},Object.assign(m,{fill:function(){return b.color||"rgba(0,0,256, 0.5)"}})},draw:function(){var a=this.node().config,b=a.options.slot(a.uid),c=this.calcStat(this.node().screenModel.model);this.drawElement(b,c)},drawElement:function(b,c){var d=this,e=this.node().screenModel,k=a.api.d3_animationInterceptor,l=function(a,b){var c=d.node().config.guide.animationSpeed,f=a.selectAll("."+b["class"]).data(function(a){return[a]},e.id);f.exit().call(k(c,null,{width:0},function(a){d3.select(a).remove()})),f.call(k(c,null,b)),f.enter().append("rect").style("stroke-width",0).call(k(c,{width:0},b))},m=function(){l(this,d.buildRangeModel(e,{size:2,y0:f,y1:i,"class":"range-min-Q1"})),l(this,d.buildRangeModel(e,{size:2,y0:j,y1:g,"class":"range-Q3-max"})),l(this,d.buildRangeModel(e,{size:20,y0:i,y1:j,"class":"range-Q1-Q3"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:g,y1:g,"class":"limit-max"})),l(this,d.buildRangeModel(e,{size:20,minHeight:1,y0:f,y1:f,"class":"limit-min"})),l(this,d.buildRangeModel(e,{size:20,minHeight:2,y0:h,y1:h,color:"#ff0000","class":"limit-median"}))},n=b.selectAll(".box-whiskers-node").data(c);n.exit().remove(),n.call(m),n.enter().append("g").attr("class","box-whiskers-node").call(m)}},"ELEMENT.GENERIC.CARTESIAN"),a.api.plugins.add("box-whiskers",d),d}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){a=a||{};var b=document.createElementNS(d.ns.prefix.svg,"g"),c=d.select(b).attr("class","tau-crosshair__label");c.append("rect").attr("class","tau-crosshair__label__box"),c.append("text").attr("class","tau-crosshair__label__text-shadow"),c.append("text").attr("class","tau-crosshair__label__text");var e=function(b){var d=b.x,e=b.y,f=b.text,g=b.color,h=b.colorCls;c.attr("class","tau-crosshair__label "+h);var i=a.halign,j=a.valign,k=a.hpad,l=a.vpad,m={left:"end",middle:"middle",right:"start"}[i],n={left:-k,middle:0,right:k}[i],o=c.select(".tau-crosshair__label__text").attr("fill",g),p=c.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",m).attr("x",d+n).attr("y",0).text(f),q=o.node().getBBox(),r={top:-l-q.height/2,middle:0,bottom:l+q.height/2}[j]-q.height/2-q.y;p.attr("y",e+r);var s=q.width+2*k,t=q.height+2*l,u={left:-s,middle:-s/2,right:0}[i],v={top:-t,middle:-t/2,bottom:0}[j];c.select(".tau-crosshair__label__box").attr("fill",g).attr("rx",a.boxCornerRadius).attr("ry",a.boxCornerRadius).attr("x",d+u).attr("y",e+v).attr("width",s).attr("height",t)},f=function(){c.attr("transform","");var d=a.chart.getLayout().contentContainer.getBoundingClientRect(),e=a.chart.getSVG().getBoundingClientRect(),f=b.getBoundingClientRect(),g=Math.max(0,Math.max(d.left,e.left)-f.left)||Math.min(0,Math.min(d.right,e.right)-f.right),h=Math.max(0,Math.max(d.top,e.top)-f.top)||Math.min(0,Math.min(d.bottom,e.bottom)-f.bottom);c.attr("transform","translate("+g+","+h+")")},g={options:function(b){return a=Object.assign(a,b),g},show:function(c){return a.container.appendChild(b),e(c),f(),g},hide:function(){return b.parentNode&&b.parentNode.removeChild(b),g}};return g}function c(c){var h=e.defaults(c||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22}),i={init:function(a){this._chart=a,this._formatters={},this._createNode()},_createNode:function(){var a=d.select(document.createElementNS(d.ns.prefix.svg,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var c=function(c){var d=a.append("g").attr("class","tau-crosshair__group "+c);d.append("line").attr("class","tau-crosshair__line-shadow"),d.append("line").attr("class","tau-crosshair__line"),this._labels[c]=b({container:d.node(),chart:this._chart,halign:"x"===c?"middle":"left",valign:"x"===c?"bottom":"middle",boxCornerRadius:h.labelBoxCornerRadius,hpad:h.labelBoxHPadding,vpad:h.labelBoxVPadding})}.bind(this);h.xAxis&&c("x"),h.yAxis&&c("y"),this._element=a},_setValues:function(a,b,c){var d=function(a){var b=this._element.select(".tau-crosshair__group."+a.dir);b.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+c.cls).attr("stroke",c.color),b.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",a.startPt.x).attr("x2",a.valuePt.x).attr("y1",a.startPt.y).attr("y2",a.valuePt.y),("x"===a.dir&&h.xAxis||"y"===a.dir&&h.yAxis)&&this._labels[a.dir].options({halign:a.labelHAlign,valign:a.labelVAlign}).show({x:a.startPt.x,y:a.startPt.y,text:a.label,color:c.color,colorCls:c.cls})}.bind(this);d({dir:"x",startPt:{x:a.value,y:b.start+(a.minMode?0:h.axisVPadding)},valuePt:{x:a.value,y:b.value+b.crossPadding},label:a.label,labelHAlign:"middle",labelVAlign:"bottom"}),d({dir:"y",startPt:{x:a.start-(b.minMode?0:h.axisHPadding),y:b.value},valuePt:{x:a.value-a.crossPadding,y:b.value},label:b.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(a,b,c){var d=this._chart.getSVG(),e=b.config.options.container.node(),g=f.getDeepTransformTranslate(e);this._element.attr("transform",f.translate(g.x,g.y)),d.appendChild(this._element.node());var h=b.getScale("x"),i=b.getScale("y"),j=b.getScale("color"),k=j(a.data[j.dim]),l=a.data[h.dim],m=a.data[i.dim],n=b.screenModel.x(a.data),o=b.screenModel.y(a.data);if(b.config.stack)if(b.config.flip){var p=b.data().filter(function(c){var d=c[i.dim];return c===a.data||(d===m||d-m===0)&&(b.screenModel.x(a.data)-b.screenModel.x(c))*c[h.dim]>0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="<html"===d.substring(0,5).toLowerCase();e&&(a.api.globalSettings.log("[export plugin]: canvg error","error"),a.api.globalSettings.log(d,"error")),c(j.toDataURL("image/png"))}})})}.bind(this))},_findUnit:function(a){var b=a.getSpec(),c=a.getSpec(),d=function(a){var b=c.scales[a];return b&&b.dim&&b.source&&c.sources[b.source].dims[b.dim]};return k.depthFirstSearch(b.unit,function(a){if(d(a.color))return!0;if(d(a.size)){var b=c.scales[a.size];return"measure"===c.sources[b.source].dims[b.dim].type}})},_toPng:function(a){this._createDataUrl(a).then(function(a){for(var b=atob(a.substring("data:image/png;base64,".length)),d=new Uint8Array(b.length),e=0,f=b.length;e<f;++e)d[e]=b.charCodeAt(e);var g=new Blob([d.buffer],{type:"image/png"});c(g,(this._fileName||"export")+".png")}.bind(this))},_toPrint:function(a){this._createDataUrl(a).then(function(a){h=document.createElement("img"),h.classList.add("graphical-report__print-block");var b=h;document.body.appendChild(b),b.src=a,document.head.appendChild(r),b.onload=function(){window.print()}})},_toJson:function(a){var b=this._exportFields,c=a.getData(),d=a.getDataDims(),e=b.length?b:Object.keys(d),f=this._normalizeExportFields(e.concat(this._appendFields),this._excludeFields),g=c.map(function(a){return f.reduce(function(b,c){return b[c.title]=c.value(a),b},{})}),h=JSON.stringify(g,null,2),i=(this._fileName||"export")+".json";u(i,"application/json",h)},_toCsv:function(a){var b=this._csvSeparator,c=this._exportFields,d=a.getData(),e=a.getDataDims(),f=c.length?c:Object.keys(e),g=this._normalizeExportFields(f.concat(this._appendFields),this._excludeFields),h=d.reduce(function(a,c){return a.concat(g.reduce(function(a,b){var d=b.value(c),e=JSON.stringify(d);if(!j.isDate(d)&&j.isObject(d))e=\'"\'+e.replace(/"/g,\'""\')+\'"\';else{var f=m(e,\'"\').replace(/"/g,\'""\'),g=Boolean([\'"\',",",";","\\n","\\r"].find(function(a){return f.indexOf(a)>=0}));e=g?\'"\'+f+\'"\':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\\r\\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return\'<text x="25" y="\'+f+\'">\'+a+"</text>"}),s=[\'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="\'+n+\'" width="100%">\',"   <defs>",\'       <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%">\',q.join(""),"       </linearGradient>","   </defs>",\'   <text x="0" y="10" style="\'+i+\'">\'+h+"</text>",\'   <g transform="translate(0,20)">\',\'       <rect x="0" y="0" height="\'+(n-p)+\'" width="20" fill="url(#grad1)">\',"       </rect>",r.join(""),"   </g>","   Sorry, your browser does not support inline SVG.","</svg>"].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5;\nh=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log(\'[export plugin]: the "cssPath" parameter should be specified for correct operation\',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader(\'<a class="graphical-report__export" style="\'+c+\'">Export</a>\');var d=b.addBalloon({place:"bottom-left"});d.content([\'<ul class="graphical-report__export__list">\',\'<li class="graphical-report__export__item">\',\'   <a data-value="print" tabindex="1">\'+l.get("Print")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="png" tabindex="2">\'+l.get("Export to png")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="csv" tabindex="3">\'+l.get("Export to CSV")+"</a>","</li>",\'<li class="graphical-report__export__item">\',\'   <a data-value="json" tabindex="4">\'+l.get("Export to JSON")+"</a>","</li>","</ul>"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\\(([^\\)]*)\\)/g,"     $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\\*\\s\\+>~]/g," "),a=a.replace(/[#\\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a<f.Images.length;a++)if(!f.Images[a].loaded)return!1;return!0},f.trim=function(a){return a.replace(/^\\s+|\\s+$/g,"")},f.compressSpaces=function(a){return a.replace(/[\\s\\r\\t\\n]+/gm," ")},f.ajax=function(a){var b;return b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b?(b.open("GET",a,!1),b.send(null),b.responseText):null},f.parseXml=function(a){if("undefined"!=typeof Windows&&"undefined"!=typeof Windows.Data&&"undefined"!=typeof Windows.Data.Xml){var b=new Windows.Data.Xml.Dom.XmlDocument,c=new Windows.Data.Xml.Dom.XmlLoadSettings;return c.prohibitDtd=!1,b.loadXml(a,c),b}if(window.DOMParser){var d=new DOMParser;return d.parseFromString(a,"text/xml")}a=a.replace(/<!DOCTYPE svg[^>]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\\)\'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\\.\\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;h<d.length;h++)e.fontStyle||a.Styles.indexOf(d[h])==-1?e.fontVariant||a.Variants.indexOf(d[h])==-1?e.fontWeight||a.Weights.indexOf(d[h])==-1?e.fontSize?"inherit"!=d[h]&&(g+=d[h]):("inherit"!=d[h]&&(c.fontSize=d[h].split("/")[0]),e.fontStyle=e.fontVariant=e.fontWeight=e.fontSize=!0):("inherit"!=d[h]&&(c.fontWeight=d[h]),e.fontStyle=e.fontVariant=e.fontWeight=!0):("inherit"!=d[h]&&(c.fontVariant=d[h]),e.fontStyle=e.fontVariant=!0):("inherit"!=d[h]&&(c.fontStyle=d[h]),e.fontStyle=!0);return""!=g&&(c.fontFamily=g),c}},f.ToNumberArray=function(a){for(var b=f.trim(f.compressSpaces((a||"").replace(/,/g," "))).split(" "),c=0;c<b.length;c++)b[c]=parseFloat(b[c]);return b},f.Point=function(a,b){this.x=a,this.y=b},f.Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},f.Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},f.CreatePoint=function(a){var b=f.ToNumberArray(a);return new f.Point(b[0],b[1])},f.CreatePath=function(a){for(var b=f.ToNumberArray(a),c=[],d=0;d<b.length;d+=2)c.push(new f.Point(b[d],b[d+1]));return c},f.BoundingBox=function(a,b,c,d){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(a,b){null!=a&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=a,this.x2=a),a<this.x1&&(this.x1=a),a>this.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),b<this.y1&&(this.y1=b),b>this.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0<s&&s<1&&(0==i&&this.addX(n(s)),1==i&&this.addY(n(s)));var t=(-o-Math.sqrt(r))/(2*p);0<t&&t<1&&(0==i&&this.addX(n(t)),1==i&&this.addY(n(t)))}}else{if(0==o)continue;var u=-q/o;0<u&&u<1&&(0==i&&this.addX(n(u)),1==i&&this.addY(n(u)))}}},this.isPointInBox=function(a,b){return this.x1<=a&&a<=this.x2&&this.y1<=b&&b<=this.y2},this.addPoint(a,b),this.addPoint(c,d)},f.Transform=function(a){var b=this;this.Type={},this.Type.translate=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.translate(this.p.x||0,this.p.y||0)},this.unapply=function(a){a.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(a){a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(a){var b=f.ToNumberArray(a);this.angle=new f.Property("angle",b[0]),this.cx=b[1]||0,this.cy=b[2]||0,this.apply=function(a){a.translate(this.cx,this.cy),a.rotate(this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.unapply=function(a){a.translate(this.cx,this.cy),a.rotate(-1*this.angle.toRadians()),a.translate(-this.cx,-this.cy)},this.applyToPoint=function(a){var b=this.angle.toRadians();a.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),a.applyTransform([Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0]),a.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(a){this.p=f.CreatePoint(a),this.apply=function(a){a.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(a){a.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(a){a.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(a){this.m=f.ToNumberArray(a),this.apply=function(a){a.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(a){var b=this.m[0],c=this.m[2],d=this.m[4],e=this.m[1],f=this.m[3],g=this.m[5],h=0,i=0,j=1,k=1/(b*(f*j-g*i)-c*(e*j-g*h)+d*(e*i-f*h));a.transform(k*(f*j-g*i),k*(g*h-e*j),k*(d*i-c*j),k*(b*j-d*h),k*(c*g-d*f),k*(d*e-b*g))},this.applyToPoint=function(a){a.applyTransform(this.m)}},this.Type.SkewBase=function(a){this.base=b.Type.matrix,this.base(a),this.angle=new f.Property("angle",a)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(a){this.base=b.Type.SkewBase,this.base(a),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].apply(a)},this.unapply=function(a){for(var b=this.transforms.length-1;b>=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;b<this.transforms.length;b++)this.transforms[b].applyToPoint(a)};for(var c=f.trim(f.compressSpaces(a)).replace(/\\)([a-zA-Z])/g,") $1").replace(/\\)(\\s?,\\s?)/g,") ").split(/\\s(?=[a-z])/),d=0;d<c.length;d++){var e=f.trim(c[d].split("(")[0]),g=c[d].split("(")[1].replace(")",""),h=new this.Type[e](g);h.type=e,this.transforms.push(h)}},f.AspectRatio=function(a,b,c,d,e,g,h,i,j,k){b=f.compressSpaces(b),b=b.replace(/^defer\\s/,"");var l=b.split(" ")[0]||"xMidYMid",m=b.split(" ")[1]||"meet",n=c/d,o=e/g,p=Math.min(n,o),q=Math.max(n,o);"meet"==m&&(d*=p,g*=p),"slice"==m&&(d*=q,g*=q),j=new f.Property("refX",j),k=new f.Property("refY",k),j.hasValue()&&k.hasValue()?a.translate(-p*j.toPixels("x"),-p*k.toPixels("y")):(l.match(/^xMid/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c/2-d/2,0),l.match(/YMid$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e/2-g/2),l.match(/^xMax/)&&("meet"==m&&p==o||"slice"==m&&q==o)&&a.translate(c-d,0),l.match(/YMax$/)&&("meet"==m&&p==n||"slice"==m&&q==n)&&a.translate(0,e-g)),"none"==l?a.scale(n,o):"meet"==m?a.scale(p,p):"slice"==m&&a.scale(q,q),a.translate(null==h?0:-h,null==i?0:-i)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(a){if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(a,b){var c=this.attributes[a];return null!=c?c:(1==b&&(c=new f.Property(a,""),this.attributes[a]=c),c||f.EmptyProperty)},this.getHrefAttribute=function(){for(var a in this.attributes)if("href"==a||a.match(/:href$/))return this.attributes[a];return f.EmptyProperty},this.style=function(a,b,c){var d=this.styles[a];if(null!=d)return d;var e=this.attribute(a);if(null!=e&&e.hasValue())return this.styles[a]=e,e;if(1!=c){var g=this.parent;if(null!=g){var h=g.style(a);if(null!=h&&h.hasValue())return h}}return 1==b&&(d=new f.Property(a,""),this.styles[a]=d),d||f.EmptyProperty},this.render=function(a){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(a.save(),this.style("mask").hasValue()){var b=this.style("mask").getDefinition();null!=b&&b.apply(a,this)}else if(this.style("filter").hasValue()){var c=this.style("filter").getDefinition();null!=c&&c.apply(a,this)}else this.setContext(a),this.renderChildren(a),this.clearContext(a);a.restore()}},this.setContext=function(a){},this.clearContext=function(a){},this.renderChildren=function(a){for(var b=0;b<this.children.length;b++)this.children[b].render(a)},this.addChild=function(a,b){var c=a;b&&(c=f.CreateElement(a)),c.parent=this,"title"!=c.type&&this.children.push(c)},this.addStylesFromStyleDefinition=function(){for(var b in f.Styles)if("@"!=b[0]&&e(a,b)){var c=f.Styles[b],d=f.StylesSpecificity[b];if(null!=c)for(var g in c){var h=this.stylesSpecificity[g];"undefined"==typeof h&&(h="000"),d>h&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b<a.attributes.length;b++){var c=a.attributes[b];this.attributes[c.nodeName]=new f.Property(c.nodeName,c.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(var d=this.attribute("style").value.split(";"),b=0;b<d.length;b++)if(""!=f.trim(d[b])){var g=d[b].split(":"),h=f.trim(g[0]),i=f.trim(g[1]);this.styles[h]=new f.Property(h,i)}this.attribute("id").hasValue()&&null==f.Definitions[this.attribute("id").value]&&(f.Definitions[this.attribute("id").value]=this);for(var b=0;b<a.childNodes.length;b++){var j=a.childNodes[b];if(1==j.nodeType&&this.addChild(j,!0),this.captureTextNodes&&(3==j.nodeType||4==j.nodeType)){var k=j.value||j.text||j.textContent||"";""!=f.compressSpaces(k)&&this.addChild(new f.Element.tspan(j),!1)}}}},f.Element.RenderedElementBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.setContext=function(a){if(this.style("fill").isUrlDefinition()){var b=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity"));null!=b&&(a.fillStyle=b)}else if(this.style("fill").hasValue()){var c=this.style("fill");"currentColor"==c.value&&(c.value=this.style("color").value),"inherit"!=c.value&&(a.fillStyle="none"==c.value?"rgba(0,0,0,0)":c.value)}if(this.style("fill-opacity").hasValue()){var c=new f.Property("fill",a.fillStyle);c=c.addOpacity(this.style("fill-opacity")),a.fillStyle=c.value}if(this.style("stroke").isUrlDefinition()){var b=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity"));null!=b&&(a.strokeStyle=b)}else if(this.style("stroke").hasValue()){var d=this.style("stroke");"currentColor"==d.value&&(d.value=this.style("color").value),"inherit"!=d.value&&(a.strokeStyle="none"==d.value?"rgba(0,0,0,0)":d.value)}if(this.style("stroke-opacity").hasValue()){var d=new f.Property("stroke",a.strokeStyle);d=d.addOpacity(this.style("stroke-opacity")),a.strokeStyle=d.value}if(this.style("stroke-width").hasValue()){var e=this.style("stroke-width").toPixels();a.lineWidth=0==e?.001:e}if(this.style("stroke-linecap").hasValue()&&(a.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(a.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(a.miterLimit=this.style("stroke-miterlimit").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var g=f.ToNumberArray(this.style("stroke-dasharray").value);"undefined"!=typeof a.setLineDash?a.setLineDash(g):"undefined"!=typeof a.webkitLineDash?a.webkitLineDash=g:"undefined"==typeof a.mozDash||1==g.length&&0==g[0]||(a.mozDash=g);var h=this.style("stroke-dashoffset").numValueOrDefault(1);"undefined"!=typeof a.lineDashOffset?a.lineDashOffset=h:"undefined"!=typeof a.webkitLineDashOffset?a.webkitLineDashOffset=h:"undefined"!=typeof a.mozDashOffset&&(a.mozDashOffset=h)}if("undefined"!=typeof a.font&&(a.font=f.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString()),this.style("transform",!1,!0).hasValue()){var i=new f.Transform(this.style("transform",!1,!0).value);i.apply(a)}if(this.style("clip-path",!1,!0).hasValue()){var j=this.style("clip-path",!1,!0).getDefinition();null!=j&&j.apply(a)}this.style("opacity").hasValue()&&(a.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.path=function(a){return null!=a&&a.beginPath(),new f.BoundingBox},this.renderChildren=function(a){this.path(a),f.Mouse.checkPath(this,a),""!=a.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?a.fill(this.style("fill-rule").value):a.fill()),""!=a.strokeStyle&&a.stroke();var b=this.getMarkers();if(null!=b){if(this.style("marker-start").isUrlDefinition()){var c=this.style("marker-start").getDefinition();c.render(a,b[0][0],b[0][1])}if(this.style("marker-mid").isUrlDefinition())for(var c=this.style("marker-mid").getDefinition(),d=1;d<b.length-1;d++)c.render(a,b[d][0],b[d][1]);if(this.style("marker-end").isUrlDefinition()){var c=this.style("marker-end").getDefinition();c.render(a,b[b.length-1][0],b[b.length-1][1])}}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseClearContext=this.clearContext,this.clearContext=function(a){this.baseClearContext(a),f.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(a){a.strokeStyle="rgba(0,0,0,0)",a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,"undefined"!=typeof a.font&&"undefined"!=typeof window.getComputedStyle&&(a.font=window.getComputedStyle(a.canvas).getPropertyValue("font")),this.baseSetContext(a),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),a.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var b=f.ViewPort.width(),c=f.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),"undefined"==typeof this.root){b=this.attribute("width").toPixels("x"),c=this.attribute("height").toPixels("y");var d=0,e=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(d=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(a.beginPath(),a.moveTo(d,e),a.lineTo(b,e),a.lineTo(b,c),a.lineTo(d,c),a.closePath(),a.clip())}if(f.ViewPort.SetCurrent(b,c),this.attribute("viewBox").hasValue()){var g=f.ToNumberArray(this.attribute("viewBox").value),h=g[0],i=g[1];b=g[2],c=g[3],f.AspectRatio(a,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),b,f.ViewPort.height(),c,h,i,this.attribute("refX").value,this.attribute("refY").value),f.ViewPort.RemoveCurrent(),f.ViewPort.SetCurrent(g[2],g[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("x").toPixels("x"),c=this.attribute("y").toPixels("y"),d=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),g=this.attribute("rx").toPixels("x"),h=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(h=g),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=h),g=Math.min(g,d/2),h=Math.min(h,e/2),null!=a&&(a.beginPath(),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadraticCurveTo(b+d,c,b+d,c+h),a.lineTo(b+d,c+e-h),a.quadraticCurveTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadraticCurveTo(b,c+e,b,c+e-h),a.lineTo(b,c+h),a.quadraticCurveTo(b,c,b+g,c),a.closePath()),new f.BoundingBox(b,c,b+d,c+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=this.attribute("cx").toPixels("x"),c=this.attribute("cy").toPixels("y"),d=this.attribute("r").toPixels();return null!=a&&(a.beginPath(),a.arc(b,c,d,0,2*Math.PI,!0),a.closePath()),new f.BoundingBox(b-d,c-d,b+d,c+d)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(a){this.base=f.Element.PathElementBase,this.base(a),this.path=function(a){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").toPixels("x"),d=this.attribute("ry").toPixels("y"),e=this.attribute("cx").toPixels("x"),g=this.attribute("cy").toPixels("y");return null!=a&&(a.beginPath(),a.moveTo(e,g-d),a.bezierCurveTo(e+b*c,g-d,e+c,g-b*d,e+c,g),a.bezierCurveTo(e+c,g+b*d,e+b*c,g+d,e,g+d),a.bezierCurveTo(e-b*c,g+d,e-c,g+b*d,e-c,g),a.bezierCurveTo(e-c,g-b*d,e-b*c,g-d,e,g-d),a.closePath()),new f.BoundingBox(e-c,g-d,e+c,g+d)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(a){this.base=f.Element.PathElementBase,this.base(a),this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(a){var b=this.getPoints();return null!=a&&(a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[1].x,b[1].y)),new f.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)},this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(a){this.base=f.Element.PathElementBase,this.base(a),this.points=f.CreatePath(this.attribute("points").value),this.path=function(a){var b=new f.BoundingBox(this.points[0].x,this.points[0].y);null!=a&&(a.beginPath(),a.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,this.points[c].y),null!=a&&a.lineTo(this.points[c].x,this.points[c].y);return b},this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);return a.push([this.points[this.points.length-1],a[a.length-1][1]]),a}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(a){this.base=f.Element.polyline,this.base(a),this.basePath=this.path,this.path=function(a){var b=this.basePath(a);return null!=a&&(a.lineTo(this.points[0].x,this.points[0].y),a.closePath()),b}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(a){this.base=f.Element.PathElementBase,this.base(a);var b=this.attribute("d").value;b=b.replace(/,/gm," ");for(var c=0;c<2;c++)b=b.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\\s])/gm,"$1 $2");b=b.replace(/([^\\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),b=b.replace(/([0-9])([+\\-])/gm,"$1 $2");for(var c=0;c<2;c++)b=b.replace(/(\\.[0-9]*)(\\.)/gm,"$1 $2");b=b.replace(/([Aa](\\s+[0-9]+){3})\\s+([01])\\s*([01])/gm,"$1 $3 $4 "),b=f.compressSpaces(b),b=f.trim(b),this.PathParser=new function(a){this.tokens=a.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new f.Point(0,0),this.control=new f.Point(0,0),this.current=new f.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,\na},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a<this.angles.length;a++)if(null==this.angles[a])for(var b=a+1;b<this.angles.length;b++)if(null!=this.angles[b]){this.angles[a]=this.angles[b];break}return this.angles}}(b),this.path=function(a){var b=this.PathParser;b.reset();var c=new f.BoundingBox;for(null!=a&&a.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command){case"M":case"m":var d=b.getAsCurrentPoint();for(b.addMarker(d),c.addPoint(d.x,d.y),null!=a&&a.moveTo(d.x,d.y),b.start=b.current;!b.isCommandOrEnd();){var d=b.getAsCurrentPoint();b.addMarker(d,b.start),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"L":case"l":for(;!b.isCommandOrEnd();){var e=b.current,d=b.getAsCurrentPoint();b.addMarker(d,e),c.addPoint(d.x,d.y),null!=a&&a.lineTo(d.x,d.y)}break;case"H":case"h":for(;!b.isCommandOrEnd();){var g=new f.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y);b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"V":case"v":for(;!b.isCommandOrEnd();){var g=new f.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar());b.addMarker(g,b.current),b.current=g,c.addPoint(b.current.x,b.current.y),null!=a&&a.lineTo(b.current.x,b.current.y)}break;case"C":case"c":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!b.isCommandOrEnd();){var h=b.current,i=b.getReflectedControlPoint(),j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,i),c.addBezierCurve(h.x,h.y,i.x,i.y,j.x,j.y,k.x,k.y),null!=a&&a.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getAsControlPoint(),k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!b.isCommandOrEnd();){var h=b.current,j=b.getReflectedControlPoint();b.control=j;var k=b.getAsCurrentPoint();b.addMarker(k,j,j),c.addQuadraticCurve(h.x,h.y,j.x,j.y,k.x,k.y),null!=a&&a.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!b.isCommandOrEnd();){var h=b.current,l=b.getScalar(),m=b.getScalar(),n=b.getScalar()*(Math.PI/180),o=b.getScalar(),p=b.getScalar(),k=b.getAsCurrentPoint(),q=new f.Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(w(a,b))},y=x([1,0],[(q.x-t.x)/l,(q.y-t.y)/m]),z=[(q.x-t.x)/l,(q.y-t.y)/m],A=[(-q.x-t.x)/l,(-q.y-t.y)/m],B=x(z,A);w(z,A)<=-1&&(B=Math.PI),w(z,A)>=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d<a.length;d++)c.push([a[d],b[d]]);return c}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(a){this.base=f.Element.ElementBase,this.base(a),this.createPattern=function(a,b){var c=this.attribute("width").toPixels("x",!0),d=this.attribute("height").toPixels("y",!0),e=new f.Element.svg;e.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),e.attributes.width=new f.Property("width",c+"px"),e.attributes.height=new f.Property("height",d+"px"),e.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),e.children=this.children;var g=document.createElement("canvas");g.width=c,g.height=d;var h=g.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&h.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var i=-1;i<=1;i++)for(var j=-1;j<=1;j++)h.save(),e.attributes.x=new f.Property("x",i*g.width),e.attributes.y=new f.Property("y",j*g.height),e.render(h),h.restore();var k=a.createPattern(g,"repeat");return k}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(a){this.base=f.Element.ElementBase,this.base(a),this.baseRender=this.render,this.render=function(a,b,c){a.translate(b.x,b.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(c),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(a.lineWidth,a.lineWidth),a.save();var d=new f.Element.svg;d.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),d.attributes.refX=new f.Property("refX",this.attribute("refX").value),d.attributes.refY=new f.Property("refY",this.attribute("refY").value),d.attributes.width=new f.Property("width",this.attribute("markerWidth").value),d.attributes.height=new f.Property("height",this.attribute("markerHeight").value),d.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black")),d.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none")),d.children=this.children,d.render(a),a.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&a.scale(1/a.lineWidth,1/a.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&a.rotate(-c),a.translate(-b.x,-b.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(a){this.base=f.Element.ElementBase,this.base(a),this.render=function(a){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(a){this.base=f.Element.ElementBase,this.base(a),this.stops=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"stop"==c.type&&this.stops.push(c)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(a){for(var b=0;b<this.attributesToInherit.length;b++){var c=this.attributesToInherit[b];!this.attribute(c).hasValue()&&a.attribute(c).hasValue()&&(this.attribute(c,!0).value=a.attribute(c).value)}},this.createGradient=function(a,b,c){var d=this;this.getHrefAttribute().hasValue()&&(d=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(d));var e=function(a){if(c.hasValue()){var b=new f.Property("color",a);return b.addOpacity(c).value}return a},g=this.getGradient(a,b);if(null==g)return e(d.stops[d.stops.length-1].color);for(var h=0;h<d.stops.length;h++)g.addColorStop(d.stops[h].offset,e(d.stops[h].color));if(this.attribute("gradientTransform").hasValue()){var i=f.ViewPort.viewPorts[0],j=new f.Element.rect;j.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),j.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),j.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS);var k=new f.Element.g;k.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),k.children=[j];var l=new f.Element.svg;l.attributes.x=new f.Property("x",0),l.attributes.y=new f.Property("y",0),l.attributes.width=new f.Property("width",i.width),l.attributes.height=new f.Property("height",i.height),l.children=[k];var m=document.createElement("canvas");m.width=i.width,m.height=i.height;var n=m.getContext("2d");return n.fillStyle=g,l.render(n),n.createPattern(m,"no-repeat")}return g}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(a,b){var c="objectBoundingBox"==this.gradientUnits()?b.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return d==f&&e==g?null:a.createLinearGradient(d,e,f,g)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(a){this.base=f.Element.GradientBase,this.base(a),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(a,b){var c=b.getBoundingBox();this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var d="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),e="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=d,g=e;this.attribute("fx").hasValue()&&(f="objectBoundingBox"==this.gradientUnits()?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(g="objectBoundingBox"==this.gradientUnits()?c.y()+c.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var h="objectBoundingBox"==this.gradientUnits()?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return a.createRadialGradient(f,g,0,d,e,h)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(a){this.base=f.Element.ElementBase,this.base(a),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),this.offset>1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.begin<this.duration){var c=this.calcValue();if(this.attribute("type").hasValue()){var d=this.attribute("type").value;c=d+"("+c+")"}this.getProperty().value=c,b=!0}return b},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var a={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var b=a.progress*(this.values.value.length-1),c=Math.floor(b),d=Math.ceil(b);a.from=new f.Property("from",parseFloat(this.values.value[c])),a.to=new f.Property("to",parseFloat(this.values.value[d])),a.progress=(b-c)/(d-c)}else a.from=this.from,a.to=this.to;return a}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){var a=this.progress(),b=a.from.numValue()+(a.to.numValue()-a.from.numValue())*a.progress;return b+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(b){this.base=f.Element.AnimateBase,this.base(b),this.calcValue=function(){var b=this.progress(),c=new a(b.from.value),d=new a(b.to.value);if(c.ok&&d.ok){var e=c.r+(d.r-c.r)*b.progress,f=c.g+(d.g-c.g)*b.progress,g=c.b+(d.b-c.b)*b.progress;return"rgb("+parseInt(e,10)+","+parseInt(f,10)+","+parseInt(g,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(a){this.base=f.Element.AnimateBase,this.base(a),this.calcValue=function(){for(var a=this.progress(),b=f.ToNumberArray(a.from.value),c=f.ToNumberArray(a.to.value),d="",e=0;e<b.length;e++)d+=b[e]+(c[e]-b[e])*a.progress+" ";return d}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(a){this.base=f.Element.ElementBase,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var b=0;b<this.children.length;b++){var c=this.children[b];"font-face"==c.type?(this.fontFace=c,c.style("font-family").hasValue()&&(f.Definitions[c.style("font-family").value]=this)):"missing-glyph"==c.type?this.missingGlyph=c:"glyph"==c.type&&(""!=c.arabicForm?(this.isRTL=!0,this.isArabic=!0,"undefined"==typeof this.glyphs[c.unicode]&&(this.glyphs[c.unicode]=[]),this.glyphs[c.unicode][c.arabicForm]=c):this.glyphs[c.unicode]=c)}},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(a){this.base=f.Element.ElementBase,this.base(a),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(a){this.base=f.Element.path,this.base(a),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(a){this.captureTextNodes=!0,this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a);var b=this.style("dominant-baseline").toTextBaseline();null==b&&(b=this.style("alignment-baseline").toTextBaseline()),null!=b&&(a.textBaseline=b)},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(a,b-c,a+Math.floor(2*c/3)*this.children[0].getText().length,b)},this.renderChildren=function(a){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(a,this,0);for(var b=0;b<this.children.length;b++)this.renderChild(a,this,b)},this.getAnchorDelta=function(a,b,c){var d=this.style("text-anchor").valueOrDefault("start");if("start"!=d){for(var e=0,f=c;f<b.children.length;f++){var g=b.children[f];if(f>c&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c<d.children.length;c++)b.renderChild(a,d,c)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getGlyph=function(a,b,c){var d=b[c],e=null;if(a.isArabic){var f="isolated";(0==c||" "==b[c-1])&&c<b.length-2&&" "!=b[c+1]&&(f="terminal"),c>0&&" "!=b[c-1]&&c<b.length-2&&" "!=b[c+1]&&(f="medial"),c>0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h),j=c/b.fontFace.unitsPerEm;a.translate(this.x,this.y),a.scale(j,-j);var k=a.lineWidth;a.lineWidth=a.lineWidth*b.fontFace.unitsPerEm/c,"italic"==d&&a.transform(1,0,.4,1,0,0),i.render(a),"italic"==d&&a.transform(1,0,-.4,1,0,0),a.lineWidth=k,a.scale(1/j,-1/j),a.translate(-this.x,-this.y),this.x+=c*(i.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(this.x+=g[h])}}},this.getText=function(){},this.measureTextRecursive=function(a){for(var b=this.measureText(a),c=0;c<this.children.length;c++)b+=this.children[c].measureTextRecursive(a);return b},this.measureText=function(a){var b=this.parent.style("font-family").getDefinition();if(null!=b){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h<e.length;h++){var i=this.getGlyph(b,e,h);d+=(i.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm,"undefined"==typeof g[h]||isNaN(g[h])||(d+=g[h])}return d}var j=f.compressSpaces(this.getText());if(!a.measureText)return 10*j.length;a.save(),this.setContext(a);var k=a.measureText(j).width;return a.restore(),k}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(a){this.captureTextNodes=!0,this.base=f.Element.TextElementBase,this.base(a),this.text=f.compressSpaces(a.value||a.text||a.textContent||""),this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b<a.childNodes.length;b++)3!=a.childNodes[b].nodeType&&(this.hasText=!1);this.text=this.hasText?a.childNodes[0].value:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(a){if(this.hasText){this.baseRenderChildren(a);var b=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-b.toPixels("y"),this.x+this.measureText(a),this.y))}else if(this.children.length>0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log(\'ERROR: image "\'+b+\'" not found\'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b<this.children.length;b++)a.addBoundingBox(this.children[b].getBoundingBox());return a}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.render=function(a){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(a){this.base=f.Element.ElementBase,this.base(a);for(var b="",d=0;d<a.childNodes.length;d++)b+=a.childNodes[d].data;b=b.replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm,""),b=f.compressSpaces(b);for(var e=b.split("}"),d=0;d<e.length;d++)if(""!=f.trim(e[d]))for(var g=e[d].split("{"),h=g[0].split(","),i=g[1].split(";"),j=0;j<h.length;j++){var k=f.trim(h[j]);if(""!=k){for(var l=f.Styles[k]||{},m=0;m<i.length;m++){var n=i[m].indexOf(":"),o=i[m].substr(0,n),p=i[m].substr(n+1,i[m].length-n);null!=o&&null!=p&&(l[f.trim(o)]=new f.Property(f.trim(o),f.trim(p)))}if(f.Styles[k]=l,f.StylesSpecificity[k]=c(k),"@font-face"==k)for(var q=l["font-family"].value.replace(/"/g,""),r=l.src.value.split(","),s=0;s<r.length;s++)if(r[s].indexOf(\'format("svg")\')>0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y<x.length;y++){var z=f.CreateElement(x[y]);f.Definitions[q]=z}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.baseSetContext=this.setContext,this.setContext=function(a){this.baseSetContext(a),this.attribute("x").hasValue()&&a.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").toPixels("y"))};var b=this.getHrefAttribute().getDefinition();this.path=function(a){null!=b&&b.path(a)},this.getBoundingBox=function(){if(null!=b)return b.getBoundingBox()},this.renderChildren=function(a){if(null!=b){var c=b;"symbol"==b.type&&(c=new f.Element.svg,c.type="svg",c.attributes.viewBox=new f.Property("viewBox",b.attribute("viewBox").value),c.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",b.attribute("preserveAspectRatio").value),c.attributes.overflow=new f.Property("overflow",b.attribute("overflow").value),c.children=b.children),"svg"==c.type&&(this.attribute("width").hasValue()&&(c.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(c.attributes.height=new f.Property("height",this.attribute("height").value)));var d=c.parent;c.parent=null,c.render(a),c.parent=d}}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");if(0==e&&0==g){for(var h=new f.BoundingBox,i=0;i<this.children.length;i++)h.addBoundingBox(this.children[i].getBoundingBox());var c=Math.floor(h.x1),d=Math.floor(h.y1),e=Math.floor(h.width()),g=Math.floor(h.height())}var j=b.attribute("mask").value;b.attribute("mask").value="";var k=document.createElement("canvas");k.width=c+e,k.height=d+g;var l=k.getContext("2d");this.renderChildren(l);var m=document.createElement("canvas");m.width=c+e,m.height=d+g;var n=m.getContext("2d");b.render(n),n.globalCompositeOperation="destination-in",n.fillStyle=l.createPattern(k,"no-repeat"),n.fillRect(0,0,c+e,d+g),a.fillStyle=n.createPattern(m,"no-repeat"),a.fillRect(0,0,c+e,d+g),b.attribute("mask").value=j},this.render=function(a){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a){var b=CanvasRenderingContext2D.prototype.beginPath;CanvasRenderingContext2D.prototype.beginPath=function(){};var c=CanvasRenderingContext2D.prototype.closePath;CanvasRenderingContext2D.prototype.closePath=function(){},b.call(a);for(var d=0;d<this.children.length;d++){var e=this.children[d];if("undefined"!=typeof e.path){var g=null;e.style("transform",!1,!0).hasValue()&&(g=new f.Transform(e.style("transform",!1,!0).value),g.apply(a)),e.path(a),CanvasRenderingContext2D.prototype.closePath=c,g&&g.unapply(a)}}c.call(a),a.clip(),CanvasRenderingContext2D.prototype.beginPath=b,CanvasRenderingContext2D.prototype.closePath=c},this.render=function(a){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b){var c=b.getBoundingBox(),d=Math.floor(c.x1),e=Math.floor(c.y1),f=Math.floor(c.width()),g=Math.floor(c.height()),h=b.style("filter").value;b.style("filter").value="";for(var i=0,j=0,k=0;k<this.children.length;k++){var l=this.children[k].extraFilterDistance||0;i=Math.max(i,l),j=Math.max(j,l)}var m=document.createElement("canvas");m.width=f+2*i,m.height=g+2*j;var n=m.getContext("2d");n.translate(-d+i,-e+j),b.render(n);for(var k=0;k<this.children.length;k++)"function"==typeof this.children[k].apply&&this.children[k].apply(n,0,0,f+2*i,g+2*j);a.drawImage(m,0,0,f+2*i,g+2*j,d-i,e-j,f+2*i,g+2*j),b.style("filter",!0).value=h},this.render=function(a){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(a){this.base=f.Element.ElementBase,this.base(a),this.apply=function(a,b,c,d,e){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(a){function b(a,b,c,d,e,f){return a[c*d*4+4*b+f]}function c(a,b,c,d,e,f,g){a[c*d*4+4*b+f]=g}function d(a,b){var c=e[a];return c*(c<0?b-255:b)}this.base=f.Element.ElementBase,this.base(a);var e=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var g=e[0];e=[.213+.787*g,.715-.715*g,.072-.072*g,0,0,.213-.213*g,.715+.285*g,.072-.072*g,0,0,.213-.213*g,.715-.715*g,.072+.928*g,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var h=e[0]*Math.PI/180,i=function(a,b,c){return a+Math.cos(h)*b+Math.sin(h)*c};e=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(a,e,f,g,h){for(var i=a.getImageData(0,0,g,h),f=0;f<h;f++)for(var e=0;e<g;e++){var j=b(i.data,e,f,g,h,0),k=b(i.data,e,f,g,h,1),l=b(i.data,e,f,g,h,2),m=b(i.data,e,f,g,h,3);c(i.data,e,f,g,h,0,d(0,j)+d(1,k)+d(2,l)+d(3,m)+d(4,1)),c(i.data,e,f,g,h,1,d(5,j)+d(6,k)+d(7,l)+d(8,m)+d(9,1)),c(i.data,e,f,g,h,2,d(10,j)+d(11,k)+d(12,l)+d(13,m)+d(14,1)),c(i.data,e,f,g,h,3,d(15,j)+d(16,k)+d(17,l)+d(18,m)+d(19,1))}a.clearRect(0,0,g,h),a.putImageData(i,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(a){this.base=f.Element.ElementBase,this.base(a),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(a,c,d,e,g){return"undefined"==typeof b.canvasRGBA?void f.log("ERROR: StackBlur.js must be included for blur to work"):(a.canvas.id=f.UniqueId(),a.canvas.style.display="none",document.body.appendChild(a.canvas),b.canvasRGBA(a.canvas.id,c,d,e,g,this.blurRadius),void document.body.removeChild(a.canvas))}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(a){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(a){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(a){f.log("ERROR: Element \'"+a.nodeName+"\' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(a){var b=a.nodeName.replace(/^[^:]+:/,"");b=b.replace(/\\-/g,"");var c=null;return c="undefined"!=typeof f.Element[b]?new f.Element[b](a):new f.Element.MISSING(a),c.type=a.nodeName,c},f.load=function(a,b){f.loadXml(a,f.ajax(b))},f.loadXml=function(a,b){f.loadXmlDoc(a,f.parseXml(b))},f.loadXmlDoc=function(a,b){f.init(a);var c=function(b){for(var c=a.canvas;c;)b.x-=c.offsetLeft,\nb.y-=c.offsetTop,c=c.offsetParent;return window.scrollX&&(b.x+=window.scrollX),window.scrollY&&(b.y+=window.scrollY),b};1!=f.opts.ignoreMouse&&(a.canvas.onclick=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onclick(b.x,b.y)},a.canvas.onmousemove=function(a){var b=c(new f.Point(null!=a?a.clientX:event.clientX,null!=a?a.clientY:event.clientY));f.Mouse.onmousemove(b.x,b.y)});var d=f.CreateElement(b.documentElement);d.root=!0,d.addStylesFromStyleDefinition();var e=!0,g=function(){f.ViewPort.Clear(),a.canvas.parentNode&&f.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight),1!=f.opts.ignoreDimensions&&(d.style("width").hasValue()&&(a.canvas.width=d.style("width").toPixels("x"),a.canvas.style.width=a.canvas.width+"px"),d.style("height").hasValue()&&(a.canvas.height=d.style("height").toPixels("y"),a.canvas.style.height=a.canvas.height+"px"));var c=a.canvas.clientWidth||a.canvas.width,g=a.canvas.clientHeight||a.canvas.height;if(1==f.opts.ignoreDimensions&&d.style("width").hasValue()&&d.style("height").hasValue()&&(c=d.style("width").toPixels("x"),g=d.style("height").toPixels("y")),f.ViewPort.SetCurrent(c,g),null!=f.opts.offsetX&&(d.attribute("x",!0).value=f.opts.offsetX),null!=f.opts.offsetY&&(d.attribute("y",!0).value=f.opts.offsetY),null!=f.opts.scaleWidth||null!=f.opts.scaleHeight){var h=null,i=null,j=f.ToNumberArray(d.attribute("viewBox").value);null!=f.opts.scaleWidth&&(d.attribute("width").hasValue()?h=d.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(j[2])||(h=j[2]/f.opts.scaleWidth)),null!=f.opts.scaleHeight&&(d.attribute("height").hasValue()?i=d.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(j[3])||(i=j[3]/f.opts.scaleHeight)),null==h&&(h=i),null==i&&(i=h),d.attribute("width",!0).value=f.opts.scaleWidth,d.attribute("height",!0).value=f.opts.scaleHeight,d.style("transform",!0,!0).value+=" scale("+1/h+","+1/i+")"}1!=f.opts.ignoreClear&&a.clearRect(0,0,c,g),d.render(a),e&&(e=!1,"function"==typeof f.opts.renderCallback&&f.opts.renderCallback(b))},h=!0;f.ImagesLoaded()&&(h=!1,g()),f.intervalID=setInterval(function(){var a=!1;if(h&&f.ImagesLoaded()&&(h=!1,a=!0),1!=f.opts.ignoreMouse&&(a|=f.Mouse.hasEvents()),1!=f.opts.ignoreAnimation)for(var b=0;b<f.Animations.length;b++)a|=f.Animations[b].update(1e3/f.FRAMERATE);"function"==typeof f.opts.forceRedraw&&1==f.opts.forceRedraw()&&(a=!0),a&&(g(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(a,b){this.events.push({type:"onclick",x:a,y:b,run:function(a){a.onclick&&a.onclick()}})},this.onmousemove=function(a,b){this.events.push({type:"onmousemove",x:a,y:b,run:function(a){a.onmousemove&&a.onmousemove()}})},this.eventElements=[],this.checkPath=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInPath&&b.isPointInPath(d.x,d.y)&&(this.eventElements[c]=a)}},this.checkBoundingBox=function(a,b){for(var c=0;c<this.events.length;c++){var d=this.events[c];b.isPointInBox(d.x,d.y)&&(this.eventElements[c]=a)}},this.runEvents=function(){f.ctx.canvas.style.cursor="";for(var a=0;a<this.events.length;a++)for(var b=this.events[a],c=this.eventElements[a];c;)b.run(c),c=c.parent;this.events=[],this.eventElements=[]}},f}var e,f=function(a,b,c){if(null!=a||null!=b||null!=c){"string"==typeof a&&(a=document.getElementById(a)),null!=a.svg&&a.svg.stop();var e=d(c||{});1==a.childNodes.length&&"OBJECT"==a.childNodes[0].nodeName||(a.svg=e);var g=a.getContext("2d");"undefined"!=typeof b.documentElement?e.loadXmlDoc(g,b):"<"==b.substr(0,1)?e.loadXml(g,b):e.load(g,b)}else for(var h=document.querySelectorAll("svg"),i=0;i<h.length;i++){var j=h[i],k=document.createElement("canvas");k.width=j.clientWidth,k.height=j.clientHeight,j.parentNode.insertBefore(k,j),j.parentNode.removeChild(j);var l=document.createElement("div");l.appendChild(j),f(k,l.innerHTML)}};"undefined"!=typeof Element.prototype.matches?e=function(a,b){return a.matches(b)}:"undefined"!=typeof Element.prototype.webkitMatchesSelector?e=function(a,b){return a.webkitMatchesSelector(b)}:"undefined"!=typeof Element.prototype.mozMatchesSelector?e=function(a,b){return a.mozMatchesSelector(b)}:"undefined"!=typeof Element.prototype.msMatchesSelector?e=function(a,b){return a.msMatchesSelector(b)}:"undefined"!=typeof Element.prototype.oMatchesSelector?e=function(a,b){return a.oMatchesSelector(b)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(e=function(a,b){return $(a).is(b)}),"undefined"==typeof e&&(e=Sizzle.matchesSelector));var g=/(\\[[^\\]]+\\])/g,h=/(#[^\\s\\+>~\\.\\[:]+)/g,j=/(\\.[^\\s\\+>~\\.\\[:]+)/g,k=/(::[^\\s\\+>~\\.\\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\\w-]+\\([^\\)]*\\))/gi,m=/(:[^\\s\\+>~\\.\\[:]+)/g,n=/([^\\s\\+>~\\.\\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e<d.length;e++){var g=d[e].re,h=d[e].process,i=g.exec(a);i&&(channels=h(i),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c<d.length;c++)for(var e=d[c].example,g=0;g<e.length;g++)a[a.length]=e[g];for(var h in b)a[a.length]=h;var i=document.createElement("ul");i.setAttribute("id","rgbcolor-examples");for(var c=0;c<a.length;c++)try{var j=document.createElement("li"),k=new f(a[c]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+k.toHex()+"; color:"+k.toHex(),l.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+a[c]+" -> "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3]/255;b[d]*=e,b[d+1]*=e,b[d+2]*=e}}function g(a){for(var b=a.data,c=a.width*a.height*4,d=0;d<c;d+=4){var e=b[d+3];0!=e&&(e=255/e,b[d]*=e,b[d+1]*=e,b[d+2]*=e)}}function h(a,b,c,d){var e=document.getElementById(a),f=e.naturalWidth,g=e.naturalHeight,h=document.getElementById(b);h.style.width=f+"px",h.style.height=g+"px",h.width=f,h.height=g;var k=h.getContext("2d");k.clearRect(0,0,f,g),k.drawImage(e,0,0),isNaN(c)||c<1||(d?i(b,0,0,f,g,c):j(b,0,0,f,g,c))}function i(a,b,c,d,e,h){if(!(isNaN(h)||h<1)){h|=0;var i,j=document.getElementById(a),n=j.getContext("2d");try{try{i=n.getImageData(b,c,d,e)}catch(o){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),i=n.getImageData(b,c,d,e)}catch(o){throw alert("Cannot access local image"),new Error("unable to access local image data: "+o)}}}catch(o){throw alert("Cannot access image"),new Error("unable to access image data: "+o)}f(i);var p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N=i.data,O=h+h+1,P=d-1,Q=e-1,R=h+1,S=R*(R+1)/2,T=new k,U=T;for(r=1;r<O;r++)if(U=U.next=new k,r==R)var V=U;U.next=T;var W=null,X=null;v=u=0;var Y=l[h],Z=m[h];for(q=0;q<e;q++){for(E=F=G=H=w=x=y=z=0,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(r=1;r<R;r++)s=u+((P<r?P:r)<<2),w+=(U.r=I=N[s])*(M=R-r),x+=(U.g=J=N[s+1])*M,y+=(U.b=K=N[s+2])*M,z+=(U.a=L=N[s+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next;for(W=T,X=V,p=0;p<d;p++)N[u]=w*Y>>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)<P?s:P)<<2,E+=W.r=N[s],F+=W.g=N[s+1],G+=W.b=N[s+2],H+=W.a=N[s+3],w+=E,x+=F,y+=G,z+=H,W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=4;v+=d}for(p=0;p<d;p++){for(F=G=H=E=x=y=z=w=0,u=p<<2,A=R*(I=N[u]),B=R*(J=N[u+1]),C=R*(K=N[u+2]),D=R*(L=N[u+3]),w+=S*I,x+=S*J,y+=S*K,z+=S*L,U=T,r=0;r<R;r++)U.r=I,U.g=J,U.b=K,U.a=L,U=U.next;for(t=d,r=1;r<=h;r++)u=t+p<<2,w+=(U.r=I=N[u])*(M=R-r),x+=(U.g=J=N[u+1])*M,y+=(U.b=K=N[u+2])*M,z+=(U.a=L=N[u+3])*M,E+=I,F+=J,G+=K,H+=L,U=U.next,r<Q&&(t+=d);for(u=p,W=T,X=V,q=0;q<e;q++)s=u<<2,N[s]=w*Y>>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)<Q?s:Q)*d<<2,w+=E+=W.r=N[s],x+=F+=W.g=N[s+1],y+=G+=W.b=N[s+2],z+=H+=W.a=N[s+3],W=W.next,A+=I=X.r,B+=J=X.g,C+=K=X.b,D+=L=X.a,E-=I,F-=J,G-=K,H-=L,X=X.next,u+=d}g(i),n.putImageData(i,b,c)}}function j(a,b,c,d,e,f){if(!(isNaN(f)||f<1)){f|=0;var g,h=document.getElementById(a),i=h.getContext("2d");try{try{g=i.getImageData(b,c,d,e)}catch(j){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),g=i.getImageData(b,c,d,e)}catch(j){throw alert("Cannot access local image"),new Error("unable to access local image data: "+j)}}}catch(j){throw alert("Cannot access image"),new Error("unable to access image data: "+j)}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=g.data,I=f+f+1,J=d-1,K=e-1,L=f+1,M=L*(L+1)/2,N=new k,O=N;for(p=1;p<I;p++)if(O=O.next=new k,p==L)var P=O;O.next=N;var Q=null,R=null;t=s=0;var S=l[f],T=m[f];for(o=0;o<e;o++){for(A=B=C=u=v=w=0,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(p=1;p<L;p++)q=s+((J<p?J:p)<<2),u+=(O.r=D=H[q])*(G=L-p),v+=(O.g=E=H[q+1])*G,w+=(O.b=F=H[q+2])*G,A+=D,B+=E,C+=F,O=O.next;for(Q=N,R=P,n=0;n<d;n++)H[s]=u*S>>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)<J?q:J)<<2,A+=Q.r=H[q],B+=Q.g=H[q+1],C+=Q.b=H[q+2],u+=A,v+=B,w+=C,Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=4;t+=d}for(n=0;n<d;n++){for(B=C=A=v=w=u=0,s=n<<2,x=L*(D=H[s]),y=L*(E=H[s+1]),z=L*(F=H[s+2]),u+=M*D,v+=M*E,w+=M*F,O=N,p=0;p<L;p++)O.r=D,O.g=E,O.b=F,O=O.next;for(r=d,p=1;p<=f;p++)s=r+n<<2,u+=(O.r=D=H[s])*(G=L-p),v+=(O.g=E=H[s+1])*G,w+=(O.b=F=H[s+2])*G,A+=D,B+=E,C+=F,O=O.next,p<K&&(r+=d);for(s=n,Q=N,R=P,o=0;o<e;o++)q=s<<2,H[q]=u*S>>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)<K?q:K)*d<<2,u+=A+=Q.r=H[q],v+=B+=Q.g=H[q+1],w+=C+=Q.b=H[q+2],Q=Q.next,x+=D=R.r,y+=E=R.g,z+=F=R.b,A-=D,B-=E,C-=F,R=R.next,s+=d}i.putImageData(g,b,c)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],m=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],n={image:h,canvasRGBA:i,canvasRGB:j};d=function(){return n}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.stackBlur=n}("undefined"!=typeof window?window:this)},function(a,b,c){var d,e;d=[],e=function(){return window.saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(b,i){var l,o,p,q=this,r=b.type,s=!1,t=function(){n(q,"writestart progress write writeend".split(" "))},u=function(){if(!s&&l||(l=c().createObjectURL(b)),o)o.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}q.readyState=q.DONE,t(),m(l)},v=function(a){return function(){if(q.readyState!==q.DONE)return a.apply(this,arguments)}},w={create:!0,exclusive:!1};return q.readyState=q.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),q.readyState=q.DONE,t(),void m(l)):(a.chrome&&r&&r!==j&&(p=b.slice||b.webkitSlice,b=p.call(b,0,b.size,j),s=!0),g&&"download"!==i&&(i+=".download"),(r===j||g)&&(o=a),h?(k+=b.size,void h(a.TEMPORARY,k,v(function(a){a.root.getDirectory("saved",w,v(function(a){var c=function(){a.getFile(i,w,v(function(a){a.createWriter(v(function(c){c.onwriteend=function(b){o.location.href=a.toURL(),q.readyState=q.DONE,n(q,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&u()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=q["on"+a]}),c.write(b),q.abort=function(){c.abort(),q.readyState=q.DONE},q.readyState=q.WRITING}),u)}),u)};a.getFile(i,{create:!1},v(function(a){a.remove(),c()}),v(function(a){a.code===a.NOT_FOUND_ERR?c():u()}))}),u)}),u)):void u())},p=o.prototype,q=function(a,b){return new o(a,b)};return p.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q}}(window)}.apply(b,d),!(void 0!==e&&(a.exports=e))},function(a,b,c){var d;(function(a,e,f){(function(){"use strict";function g(a){return"function"==typeof a||"object"==typeof a&&null!==a}function h(a){return"function"==typeof a}function i(a){return"object"==typeof a&&null!==a}function j(){}function k(){return function(){a.nextTick(o)}}function l(){var a=0,b=new R(o),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function m(){var a=new MessageChannel;return a.port1.onmessage=o,function(){a.port2.postMessage(0)}}function n(){return function(){setTimeout(o,1)}}function o(){for(var a=0;a<O;a+=2){var b=T[a],c=T[a+1];b(c),T[a]=void 0,T[a+1]=void 0}O=0}function p(){}function q(){return new TypeError("You cannot resolve a promise with itself")}function r(){return new TypeError("A promises callback cannot return that same promise.")}function s(a){try{return a.then}catch(b){return X.error=b,X}}function t(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function u(a,b,c){P(function(a){var d=!1,e=t(c,b,function(c){d||(d=!0,b!==c?x(a,c):z(a,c))},function(b){d||(d=!0,A(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,A(a,e))},a)}function v(a,b){b._state===V?z(a,b._result):a._state===W?A(a,b._result):B(b,void 0,function(b){x(a,b)},function(b){A(a,b)})}function w(a,b){if(b.constructor===a.constructor)v(a,b);else{var c=s(b);c===X?A(a,X.error):void 0===c?z(a,b):h(c)?u(a,b,c):z(a,b)}}function x(a,b){a===b?A(a,q()):g(b)?w(a,b):z(a,b)}function y(a){a._onerror&&a._onerror(a._result),C(a)}function z(a,b){a._state===U&&(a._result=b,a._state=V,0===a._subscribers.length||P(C,a))}function A(a,b){a._state===U&&(a._state=W,a._result=b,P(y,a))}function B(a,b,c,d){var e=a._subscribers,f=e.length;a._onerror=null,e[f]=b,e[f+V]=c,e[f+W]=d,0===f&&a._state&&P(C,a)}function C(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?F(c,d,e,f):e(f);a._subscribers.length=0}}function D(){this.error=null}function E(a,b){try{return a(b)}catch(c){return Y.error=c,Y}}function F(a,b,c,d){var e,f,g,i,j=h(c);if(j){if(e=E(c,d),e===Y?(i=!0,f=e.error,e=null):g=!0,b===e)return void A(b,r())}else e=d,g=!0;b._state!==U||(j&&g?x(b,e):i?A(b,f):a===V?z(b,e):a===W&&A(b,e))}function G(a,b){try{b(function(b){x(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function H(a,b,c,d){this._instanceConstructor=a,this.promise=new a(p,d),this._abortOnReject=c,this._validateInput(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._init(),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&z(this.promise,this._result))):A(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function J(){throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.")}function K(a){this._id=ca++,this._state=void 0,this._result=void 0,this._subscribers=[],p!==a&&(h(a)||I(),this instanceof K||J(),G(this,a))}var L;L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var M,N=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d<a;d++)this._eachEntry(c[d],d)},H.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;i(a)?a.constructor===c&&a._state!==U?(a._onerror=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(V,b,a))},H.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===U&&(this._remaining--,this._abortOnReject&&a===W?A(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&z(d,this._result)},H.prototype._makeResult=function(a,b,c){return c},H.prototype._willSettleAt=function(a,b){var c=this;B(a,void 0,function(a){c._settledAt(V,b,a)},function(a){c._settledAt(W,b,a)})};var $=function(a,b){return new Z(this,a,(!0),b).promise},_=function(a,b){function c(a){x(f,a)}function d(a){A(f,a)}var e=this,f=new e(p,b);if(!N(a))return A(f,new TypeError("You must pass an array to race.")),f;for(var g=a.length,h=0;f._state===U&&h<g;h++)B(e.resolve(a[h]),void 0,c,d);return f},aa=function(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(p,b);return x(d,a),d},ba=function(a,b){var c=this,d=new c(p,b);return A(d,a),d},ca=0,da=K;K.all=$,K.race=_,K.resolve=aa,K.reject=ba,K.prototype={constructor:K,then:function(a,b){var c=this,d=c._state;if(d===V&&!a||d===W&&!b)return this;var e=new this.constructor(p),f=c._result;if(d){var g=arguments[d-1];P(function(){F(d,e,g,f)})}else B(c,e,a,b);return e},"catch":function(a){return this.then(null,a)}};var ea=function(){var a;a="undefined"!=typeof e?e:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),h(b)}();b||(a.Promise=da)},fa={Promise:da,polyfill:ea};c(9).amd?(d=function(){return fa}.call(b,c,b,f),!(void 0!==d&&(f.exports=d))):"undefined"!=typeof f&&f.exports?f.exports=fa:"undefined"!=typeof this&&(this.ES6Promise=fa)}).call(this)}).call(b,c(7),function(){return this}(),c(8)(a))},function(a,b){function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function e(a){if(k===setTimeout)return setTimeout(a,0);if((k===c||!k)&&setTimeout)return k=setTimeout,setTimeout(a,0);try{return k(a,0)}catch(b){try{return k.call(null,a,0)}catch(b){return k.call(this,a,0)}}}function f(a){if(l===clearTimeout)return clearTimeout(a);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(a);try{return l(a)}catch(b){try{return l.call(null,a)}catch(b){return l.call(this,a)}}}function g(){p&&n&&(p=!1,n.length?o=n.concat(o):q=-1,o.length&&h())}function h(){if(!p){var a=e(g);p=!0;for(var b=o.length;b;){for(n=o,o=[];++q<b;)n&&n[q].run();q=-1,b=o.length}n=null,p=!1,f(a)}}function i(a,b){this.fun=a,this.array=b}function j(){}var k,l,m=a.exports={};!function(){try{k="function"==typeof setTimeout?setTimeout:c}catch(a){k=c}try{l="function"==typeof clearTimeout?clearTimeout:d}catch(a){l=d}}();var n,o=[],p=!1,q=-1;m.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];o.push(new i(a,b)),1!==o.length||p||e(h)},i.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=j,m.addListener=j,m.once=j,m.off=j,m.removeListener=j,m.removeAllListeners=j,m.emit=j,m.prependListener=j,m.prependOnceListener=j,m.listeners=function(a){return[]},m.binding=function(a){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(a){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){a.exports="body > * {\\r\\n    visibility: hidden;\\r\\n}\\r\\nbody {\\r\\n    overflow: hidden;\\r\\n}\\r\\nbody * {\\r\\n    visibility: hidden !important;\\r\\n}\\r\\n\\r\\n.graphical-report__print-block {\\r\\n    position: absolute;\\r\\n    top: 0;\\r\\n    left: 0;\\r\\n    visibility: visible !important;\\r\\n    display: block !important;\\r\\n    width: 100%;\\r\\n    /*height: 100%;*/\\r\\n}\\r\\n"},function(a,b){!function(){"use strict";function a(b){this.map={};var c=this;b instanceof a?b.forEach(function(a,b){b.forEach(function(b){c.append(a,b)})}):b&&Object.getOwnPropertyNames(b).forEach(function(a){c.append(a,b[a])})}function b(a){return a.bodyUsed?Promise.reject(new TypeError("Already read")):void(a.bodyUsed=!0)}function c(a){return new Promise(function(b,c){a.onload=function(){b(a.result)},a.onerror=function(){c(a.error)}})}function d(a){var b=new FileReader;return b.readAsArrayBuffer(a),c(b)}function e(a){var b=new FileReader;return b.readAsText(a),c(b)}function f(){return this.bodyUsed=!1,l?(this.blob=function(){var a=b(this);return a?a:Promise.resolve(this._bodyBlob)},this.arrayBuffer=function(){return this.blob().then(d)},this.text=function(){return this.blob().then(e)}):this.text=function(){var a=b(this);return a?a:Promise.resolve(this._bodyText)},"FormData"in self&&(this.formData=function(){return this.text().then(i)}),this.json=function(){return this.text().then(JSON.parse)},this}function g(a){var b=a.toUpperCase();return m.indexOf(b)>-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\\+/g," "),e=c.join("=").replace(/\\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft,\nscrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidth<F.svgWidth&&F.svgWidth>F.visibleWidth),k(h,b+F.visibleHeight<F.svgHeight&&F.svgHeight>F.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:c.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'   <input type="checkbox"\',\'          class="graphical-report__checkbox__input i-role-show-layers"\',\'          <%= (showLayers ? "checked" : "") %>\',"   />",\'   <span class="graphical-report__checkbox__icon"></span>\',\'   <span class="graphical-report__checkbox__text"><%= title %></span>\',"</label>","<div>",\'<select class="i-role-change-mode graphical-report__select graphical-report__trendlinepanel__control">\',\'   <option <%= ((mode === "dock")  ? "selected" : "") %> value="dock">\'+e.get("Dock")+"</option>",\'   <option <%= ((mode === "merge") ? "selected" : "") %> value="merge">\'+e.get("Merge")+"</option>","</select>","</div>"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:\'<div class="graphical-report__legend"></div>\',_template:d.template([\'<div class="graphical-report__legend__wrap">\',"<%=top%>",\'<div class="graphical-report__legend__title"><%=name%></div>\',"<%=items%>","</div>"].join("")),_itemTemplate:d.template(["<div data-scale-id=\'<%= scaleId %>\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class=\\"graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>\\">",\'   <div class="graphical-report__legend__guide__wrap">\',\'   <div class="graphical-report__legend__guide graphical-report__legend__guide--color <%=cssClass%>"\',\'        style="background-color: <%=cssColor%>; border-color: <%=borderColor%>;">\',\'       <div class="graphical-report__legend__guide--color__overlay">\',"       </div>","   </div>","   </div>",\'   <span class="graphical-report__legend__guide__label"><%=label%></span>\',"</div>"].join("")),_resetTemplate:d.template([\'<div class="graphical-report__legend__reset <%=classDisabled%>">\',\'<div role="button" class="graphical-report-btn">Reset</div>\',"</div>"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:\'<div class="graphical-report__legend__gradient-wrapper"></div>\'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return\'<stop offset="\'+c+\'%"      style="stop-color:\'+g(a)+\';stop-opacity:1" />\'}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:\'<div class="graphical-report__legend__size-wrapper"></div>\'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i<y.length;i++)b=y[i-1]/2,a=y[i]/2,h.push(h[i-1]+Math.max(1.618*j,b+c+a));var k=.618*j/2;return{width:C,height:h[h.length-1]+Math.max(f,j/2),circleX:d.range(y.length).map(function(){return z/2}),circleY:h,textAnchor:"start",textX:d.range(A.length).map(function(){return z+g}),textY:h.map(function(a){return a+k})}}():function(){for(var a,b,c=Math.max(x(A[0])/2,y[0]/2),e=Math.max(x(A[A.length-1])/2,y[y.length-1]/2),f=(C-y.reduce(function(a,b,c){return a+(0===c||c===y.length-1?b/2:b)},0)-c-e)/(i-1),g=8,h=[c],k=1;k<y.length;k++)b=y[k-1]/2,a=y[k]/2,h.push(h[k-1]+b+f+a);var l=y.map(function(a){return z-a/2});return{width:C,height:z+g+j,circleX:h,circleY:l,textAnchor:"middle",textX:h,textY:d.range(A.length).map(function(){return z+g+j})}}(),G=m("svg",{"class":"graphical-report__legend__size",width:F.width,height:F.height},y.map(function(a,b){return m("circle",{"class":"graphical-report__legend__size__item__circle "+(c.config.color?"color-definite":"color-default-size"),cx:F.circleX[b],cy:F.circleY[b],r:a/2})}).join(""),A.map(function(a,b){return m("text",{"class":"graphical-report__legend__size__item__label",x:F.textX[b],y:F.textY[b],"text-anchor":F.textAnchor},a)}).join(""));B.insertAdjacentHTML("beforeend",G)}})},_drawColorLegend:function(){var a=this;if(a._color.forEach(function(b){var e=a._chart.select(function(a){return a.config.color===b})[0];if(e){var f=e.config.guide||{},g=e.getScale("color"),h=a._chart.getDataSources({excludeFilter:["legend"]}),i=d.unique(h[g.source].data.map(function(a){return a[g.dim]})),j=a._chart.getSpec().scales[b];if(j.order)i=d.union(d.intersection(j.order,i),i);else{var k=a._legendOrderState[b];i=i.sort(function(a,b){var c=k[a]-k[b];return c&&c/Math.abs(c)})}var l=((f.color||{}).label||{}).text||g.dim,m=(f.color||{}).tickFormatNullAlias||"No "+l,n=i.map(function(d){var e=JSON.stringify(c(d)?null:d),f=g.dim+e;return{scaleId:b,dim:g.dim,color:g(d),disabled:a._currentFilters.hasOwnProperty(f),label:d,value:e}});a._legendColorByScaleId[b]=n,a._container.insertAdjacentHTML("beforeend",a._template({name:l,top:a._resetTemplate({classDisabled:n.some(function(a){return a.disabled})?"":"disabled"}),items:n.map(function(b){return a._itemTemplate({scaleId:b.scaleId,dim:d.escape(b.dim),color:b.color,cssClass:g.toClass(b.color),cssColor:b.disabled?"transparent":g.toColor(b.color),borderColor:g.toColor(b.color),classDisabled:b.disabled?"disabled":"",label:d.escape(c(b.label)?m:b.label),value:d.escape(b.value)})}).join("")}))}}),a._color.length>0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+\'="\'+d[a]+\'"\'}).join("")+(e.length>0?">"+e.join("")+"</"+a+">":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(a<k.min)){a>k.max&&q();var b=Math.abs(a-k.mid);b<k.diff&&b<n?(k.diff=b,k.closest=a):q(),0===b&&q()}}),o.forEach(function(a){null!==a.closest&&l.push(a.closest)}),l.push(a[a.length-1]),l=l.map(j)},p=function(a){return Math.log(a)/Math.LN10},q=function(a){return 0===a?0:Math.floor(p(Math.abs(a)))},r=function(){var a=/\\.0+([^\\d].*)?$/,b=/(\\.\\d+?)0+([^\\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),s=c.format(".3s"),t=function(a){return r(s(a))},u=function(a,b){var c=Math.max(Math.abs(a),Math.abs(b)),d=q(c),e=a*b>0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(b<f?1:0),20);return r(a.toFixed(d))}};return a.api.plugins.add("legend",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=function(a){return Math.log(a)/Math.LN10},e=function(a,b,c){return function(d){var e=d[a];return e<b||e>c}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px",\nc._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn\'t measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:\'<div class="graphical-report__filter"></div>\',_filterWrapper:c.template(\'<div class="graphical-report__filter__wrap"><div class="graphical-report__legend__title"><%=name%></div></div>\'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+"&thinsp;..&thinsp;"+l(new Date(f))+\' <tspan class="common">\'+i(new Date(f))+"</tspan>")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["\u2019%y","&thinsp;%b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientX<b.left||a.clientX>b.right||a.clientY<b.top||a.clientY>b.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:[\'<div class="i-role-reveal graphical-report__tooltip__vertical">\',\'   <div class="graphical-report__tooltip__vertical__wrap">\',"       Reveal","   </div>","</div>"].join(""),templateExclude:[\'<div class="i-role-exclude graphical-report__tooltip__exclude">\',\'   <div class="graphical-report__tooltip__exclude__wrap">\',\'       <span class="tau-icon-close-gray"></span>\',"       Exclude","   </div>","</div>"].join(""),template:[\'<div class="i-role-content graphical-report__tooltip__content"></div>\',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template([\'<div class="graphical-report__tooltip__list__item">\',\'<div class="graphical-report__tooltip__list__elem"><%=label%></div>\',\'<div class="graphical-report__tooltip__list__elem"><%=value%></div>\',"</div>"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#039;")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can\'t be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:\'<div class="graphical-report__trendlinepanel"></div>\',template:d.template([\'<label class="graphical-report__trendlinepanel__title graphical-report__checkbox">\',\'<input type="checkbox" class="graphical-report__checkbox__input i-role-show-trend" <%= showTrend %> />\',\'<span class="graphical-report__checkbox__icon"></span>\',\'<span class="graphical-report__checkbox__text">\',"<%= title %>","</span>","</label>","<div>",\'<select class="i-role-change-model graphical-report__select graphical-report__trendlinepanel__control">\',"<%= models %>","</select>","</div>",\'<div class="graphical-report__trendlinepanel__error-message"><%= error %></div>\'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return"<option "+b+\' value="\'+a+\'">\'+a+"</option>"})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;c<h;c++){for(f=c,d=c+1;d<h;d++)Math.abs(a[c][d])>Math.abs(a[c][f])&&(f=d);for(e=c;e<h+1;e++)g=a[e][c],a[e][c]=a[e][f],a[e][f]=g;for(d=c+1;d<h;d++)for(e=h;e>=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e<h;e++)g+=a[e][d]*i[e];i[d]=(a[h][d]-g)/a[d][d]}return i},b={linear:function(a){for(var b=[0,0,0,0,0],c=0,d=[];c<a.length;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0],b[3]+=a[c][0]*a[c][1],b[4]+=a[c][1]*a[c][1]);var e=(c*b[3]-b[0]*b[1])/(c*b[2]-b[0]*b[0]);e=isNaN(e)?0:e;for(var f=b[1]/c-e*b[0]/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],a[g][0]*e+f];d.push(i)}var j="y = "+Math.round(100*e)/100+"x + "+Math.round(100*f)/100;return{equation:[e,f],points:d,string:j}},exponential:function(a){var b=[0,0,0,0,0,0],c=0,d=[];for(i=a.length;c<i;c++)a[c][1]&&(b[0]+=a[c][0],b[1]+=a[c][1],b[2]+=a[c][0]*a[c][0]*a[c][1],b[3]+=a[c][1]*Math.log(a[c][1]),b[4]+=a[c][0]*a[c][1]*Math.log(a[c][1]),b[5]+=a[c][0]*a[c][1]);for(var e=b[1]*b[2]-b[5]*b[5],f=Math.pow(Math.E,(b[2]*b[3]-b[5]*b[4])/e),g=(b[1]*b[4]-b[5]*b[3])/e,h=0,i=a.length;h<i;h++){var j=[a[h][0],f*Math.pow(Math.E,g*a[h][0])];d.push(j)}var k="y = "+Math.round(100*f)/100+"e^("+Math.round(100*g)/100+"x)";return{equation:[f,g],points:d,string:k}},logarithmic:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=a[c][1]*Math.log(a[c][0]),b[2]+=a[c][1],b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=(b[2]-e*b[0])/c,g=0,h=a.length;g<h;g++){var i=[a[g][0],f+e*Math.log(a[g][0])];d.push(i)}var j="y = "+Math.round(100*f)/100+" + "+Math.round(100*e)/100+" ln(x)";return{equation:[f,e],points:d,string:j}},power:function(a){var b=[0,0,0,0],c=0,d=[];for(h=a.length;c<h;c++)a[c][1]&&(b[0]+=Math.log(a[c][0]),b[1]+=Math.log(a[c][1])*Math.log(a[c][0]),b[2]+=Math.log(a[c][1]),b[3]+=Math.pow(Math.log(a[c][0]),2));for(var e=(c*b[1]-b[2]*b[0])/(c*b[3]-b[0]*b[0]),f=Math.pow(Math.E,(b[2]-e*b[0])/c),g=0,h=a.length;g<h;g++){var i=[a[g][0],f*Math.pow(a[g][0],e)];d.push(i)}var j="y = "+Math.round(100*f)/100+"x^"+Math.round(100*e)/100;return{equation:[f,e],points:d,string:j}},polynomial:function(b,c){"undefined"==typeof c&&(c=2);for(var d=[],e=[],f=[],g=0,h=0,i=0,j=c+1;i<j;i++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(g+=Math.pow(b[k][0],i)*b[k][1]);d.push(g),g=0;for(var m=[],n=0;n<j;n++){for(var k=0,l=b.length;k<l;k++)b[k][1]&&(h+=Math.pow(b[k][0],i+n));m.push(h),h=0}e.push(m)}e.push(d);for(var o=a(e,j),i=0,l=b.length;i<l;i++){for(var p=0,q=0;q<o.length;q++)p+=o[q]*Math.pow(b[i][0],q);f.push([b[i][0],p])}for(var r="y = ",i=o.length-1;i>=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d<a.length;d++)a[d][1]?(c=a[d][1],b.push([a[d][0],a[d][1]])):b.push([a[d][0],c]);return{equation:[c],points:b,string:""+c}},loess:function(a){function b(a,b){var d=a.map(function(a){return a[0]}),e=a.map(function(a){return a[1]}),f=c(d,e,b);return d.map(function(a,b){return[a,f[b]]})}function c(a,b,c){function d(a){var b=1-a*a*a;return b*b*b}for(var e=[],f=0,g=Math.floor(c*a.length)-1,h=0;h<a.length;h++){var i=a[h];h>0&&g<a.length-1&&a[g+1]-a[h]<a[h]-a[f]&&(f++,g++);var j;j=a[h]-a[f]>a[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q<h?i-s:s-i;var u=d(r*k),v=s*u;l+=u,m+=v,n+=s*v,o+=t*u,p+=t*v,q++}var w,x=m/l,y=o/l,z=p/l,A=n/l;w=A==x*x?0:(z-x*y)/(A-x*x);var B=y-w*x;e[h]=w*i+B}return e}return{equation:"loess",points:b(a,.5),string:"loess"}}};return function(a,c,d){if("string"==typeof a)return b[a](c,d)}}(),d=a.api.utils,e=a.api.d3;return a.api.plugins.add("trendline",b),b});';
+},function(a,b,c){var d=c(7);"string"==typeof d&&(d=[[a.i,d,""]]);var e={hmr:!0,transform:void 0,insertInto:void 0};c(9)(d,e),d.locals&&(a.exports=d.locals)},function(a,b,c){(a.exports=c(8)(!1)).push([a.i,"/*! taucharts - v1.2.2 - 2017-06-01\r\n* https://github.com/TargetProcess/tauCharts\r\n* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:\"\";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:\"\";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4}",""]);
+},function(a,b,c){"use strict";a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var c=function(a,b){var c=a[1]||"",d=a[3];if(!d)return c;if(b&&"function"==typeof btoa){var e=(g=d,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(g))))+" */"),f=d.sources.map(function(a){return"/*# sourceURL="+d.sourceRoot+a+" */"});return[c].concat(f).concat([e]).join("\n")}var g;return[c].join("\n")}(b,a);return b[2]?"@media "+b[2]+"{"+c+"}":c}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];null!=f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];null!=g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=n[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(j(d.parts[f],b))}else{var g=[];for(f=0;f<d.parts.length;f++)g.push(j(d.parts[f],b));n[d.id]={id:d.id,refs:1,parts:g}}}}function e(a,b){for(var c=[],d={},e=0;e<a.length;e++){var f=a[e],g=b.base?f[0]+b.base:f[0],h={css:f[1],media:f[2],sourceMap:f[3]};d[g]?d[g].parts.push(h):c.push(d[g]={id:g,parts:[h]})}return c}function f(a,b){var c=p(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=s[s.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),s.push(b);else if("bottom"===a.insertAt)c.appendChild(b);else{if("object"!=typeof a.insertAt||!a.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var e=p(a.insertAt.before,c);c.insertBefore(b,e)}}function g(a){if(null===a.parentNode)return!1;a.parentNode.removeChild(a);var b=s.indexOf(a);b>=0&&s.splice(b,1)}function h(a){var b=document.createElement("style");if(void 0===a.attrs.type&&(a.attrs.type="text/css"),void 0===a.attrs.nonce){var d=function(){return c.nc}();d&&(a.attrs.nonce=d)}return i(b,a.attrs),f(a,b),b}function i(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function j(a,b){var c,d,e,j;if(b.transform&&a.css){if(!(j="function"==typeof b.transform?b.transform(a.css):b.transform["default"](a.css)))return function(){};a.css=j}if(b.singleton){var l=r++;c=q||(q=h(b)),d=k.bind(null,c,l,!1),e=k.bind(null,c,l,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=function(a){var b=document.createElement("link");return void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",i(b,a.attrs),f(a,b),b}(b),d=function(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=t(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=function(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function k(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}var l,m,n={},o=(l=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===m&&(m=l.apply(this,arguments)),m}),p=function(a){var b={};return function(a,c){if("function"==typeof a)return a();if(void 0===b[a]){var d=function(a,b){return b?b.querySelector(a):document.querySelector(a)}.call(this,a,c);if(window.HTMLIFrameElement&&d instanceof window.HTMLIFrameElement)try{d=d.contentDocument.head}catch(a){d=null}b[a]=d}return b[a]}}(),q=null,r=0,s=[],t=c(10);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(b=b||{}).attrs="object"==typeof b.attrs?b.attrs:{},b.singleton||"boolean"==typeof b.singleton||(b.singleton=o()),b.insertInto||(b.insertInto="head"),b.insertAt||(b.insertAt="bottom");var c=e(a,b);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g];(i=n[h.id]).refs--,f.push(i)}for(a&&d(e(a,b),b),g=0;g<f.length;g++){var i;if(0===(i=f[g]).refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete n[i.id]}}}};var u,v=(u=[],function(a,b){return u[a]=b,u.filter(Boolean).join("\n")})},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e,f=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(f)?a:(e=0===f.indexOf("//")?f:0===f.indexOf("/")?c+f:d+f.replace(/^\.\//,""),"url("+JSON.stringify(e)+")")})}}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.js
new file mode 100644 (file)
index 0000000..02a4af5
--- /dev/null
@@ -0,0 +1 @@
+!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){n(2)(n(3))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e){t.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'’]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'’](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'’](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"\'n","ſ":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case" ":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);'}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.min.js b/mobile/tct-webuifw-tests07/tests/libs/dist/common/js/tau.i3d.min.js
new file mode 100644 (file)
index 0000000..258c928
--- /dev/null
@@ -0,0 +1,2 @@
+!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&"object"==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&c&&"string"!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){c(2)(c(3))},function(a,b){a.exports=function(a){function b(a){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",a)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(a):"undefined"!=typeof eval?eval.call(null,a):b("EvalError: No eval function available")}catch(a){b(a)}}},function(a,b){a.exports='!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./dist",n(n.s=21)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const r=n(18),i={debug:"gray",error:"red",info:"blue",warn:"orange"};let o=function(t){const e=r(t);return e.color=function(t){const e=function(t){const e=t.split(":");return e[e.length-1]}(t);return i&&i[e]||null}(t),e};(o=Object.assign(o,r)).enable("R-Type:error,R-Type:info,R-Type:warn"),t.exports=o},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t){t.exports={name:"r-type",version:"0.2.0",main:"src/index.js",scripts:{dev:"webpack -d",dist:"webpack -p --config webpack.production.config.js",lint:"semistandard -v",precommit:"npm run lint"},repository:"git@github.sec.samsung.net:RS7-HighPerformanceWeb/R-Type.git",author:"Hunseop Jeong <hs85.jeong@samsung.com>",license:"MIT",devDependencies:{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","browser-sync":"^2.24.4","browser-sync-webpack-plugin":"^2.2.2","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11",debug:"^3.1.0","highlight.js":"^9.12.0","html-webpack-plugin":"^3.2.0",husky:"^0.14.3",semistandard:"^12.0.1","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.2.5",webpack:"^4.8.3","webpack-cli":"^2.1.3"},dependencies:{"@npm-polymer/webcomponentsjs":"^1.0.1",lodash:"^4.17.10",three:"^0.92.0"},semistandard:{ignore:["build/**","dist/**"]}}},function(t,e){t.exports.isPositiveNumber=function(t){return t.match(/^[0-9]+$/)},t.exports.isObject3DShorthand=function(t){return t.match(/^(0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*) (0|[+-]?[0-9]*.?[0-9]*)$/)},t.exports.isLightShorthand=function(t){return t.match(/^(0[xX])[0-9A-Fa-f]{6} (0[xX])[0-9A-Fa-f]{6} (0|[0-9]*.?[0-9]*)$/)}},function(t,e){THREE.OrbitControls=function(t,e){var n,r,i,o,a;this.object=t,this.domElement=void 0!==e?e:document,this.enabled=!0,this.target=new THREE.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:THREE.MOUSE.LEFT,ZOOM:THREE.MOUSE.MIDDLE,PAN:THREE.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){s.target0.copy(s.target),s.position0.copy(s.object.position),s.zoom0=s.object.zoom},this.reset=function(){s.target.copy(s.target0),s.object.position.copy(s.position0),s.object.zoom=s.zoom0,s.object.updateProjectionMatrix(),s.dispatchEvent(c),s.update(),p=h.NONE},this.update=(n=new THREE.Vector3,r=(new THREE.Quaternion).setFromUnitVectors(t.up,new THREE.Vector3(0,1,0)),i=r.clone().inverse(),o=new THREE.Vector3,a=new THREE.Quaternion,function(){var t=s.object.position;return n.copy(t).sub(s.target),n.applyQuaternion(r),f.setFromVector3(n),s.autoRotate&&p===h.NONE&&C(2*Math.PI/60/60*s.autoRotateSpeed),f.theta+=m.theta,f.phi+=m.phi,f.theta=Math.max(s.minAzimuthAngle,Math.min(s.maxAzimuthAngle,f.theta)),f.phi=Math.max(s.minPolarAngle,Math.min(s.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=v,f.radius=Math.max(s.minDistance,Math.min(s.maxDistance,f.radius)),s.target.add(g),n.setFromSpherical(f),n.applyQuaternion(i),t.copy(s.target).add(n),s.object.lookAt(s.target),!0===s.enableDamping?(m.theta*=1-s.dampingFactor,m.phi*=1-s.dampingFactor,g.multiplyScalar(1-s.dampingFactor)):(m.set(0,0,0),g.set(0,0,0)),v=1,!!(y||o.distanceToSquared(s.object.position)>d||8*(1-a.dot(s.object.quaternion))>d)&&(s.dispatchEvent(c),o.copy(s.object.position),a.copy(s.object.quaternion),y=!1,!0)}),this.dispose=function(){s.domElement.removeEventListener("contextmenu",W,!1),s.domElement.removeEventListener("mousedown",U,!1),s.domElement.removeEventListener("wheel",z,!1),s.domElement.removeEventListener("touchstart",G,!1),s.domElement.removeEventListener("touchend",V,!1),s.domElement.removeEventListener("touchmove",j,!1),document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",k,!1)};var s=this,c={type:"change"},u={type:"start"},l={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},p=h.NONE,d=1e-6,f=new THREE.Spherical,m=new THREE.Spherical,v=1,g=new THREE.Vector3,y=!1,b=new THREE.Vector2,_=new THREE.Vector2,x=new THREE.Vector2,w=new THREE.Vector2,E=new THREE.Vector2,T=new THREE.Vector2,M=new THREE.Vector2,S=new THREE.Vector2,A=new THREE.Vector2;function R(){return Math.pow(.95,s.zoomSpeed)}function C(t){m.theta-=t}function L(t){m.phi-=t}var P,N=(P=new THREE.Vector3,function(t,e){P.setFromMatrixColumn(e,0),P.multiplyScalar(-t),g.add(P)}),O=function(){var t=new THREE.Vector3;return function(e,n){!0===s.screenSpacePanning?t.setFromMatrixColumn(n,1):(t.setFromMatrixColumn(n,0),t.crossVectors(s.object.up,t)),t.multiplyScalar(e),g.add(t)}}(),I=function(){var t=new THREE.Vector3;return function(e,n){var r=s.domElement===document?s.domElement.body:s.domElement;if(s.object.isPerspectiveCamera){var i=s.object.position;t.copy(i).sub(s.target);var o=t.length();o*=Math.tan(s.object.fov/2*Math.PI/180),N(2*e*o/r.clientHeight,s.object.matrix),O(2*n*o/r.clientHeight,s.object.matrix)}else s.object.isOrthographicCamera?(N(e*(s.object.right-s.object.left)/s.object.zoom/r.clientWidth,s.object.matrix),O(n*(s.object.top-s.object.bottom)/s.object.zoom/r.clientHeight,s.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),s.enablePan=!1)}}();function D(t){s.object.isPerspectiveCamera?v/=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom*t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function F(t){s.object.isPerspectiveCamera?v*=t:s.object.isOrthographicCamera?(s.object.zoom=Math.max(s.minZoom,Math.min(s.maxZoom,s.object.zoom/t)),s.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),s.enableZoom=!1)}function U(t){if(!1!==s.enabled){switch(t.preventDefault(),t.button){case s.mouseButtons.ORBIT:if(!1===s.enableRotate)return;!function(t){b.set(t.clientX,t.clientY)}(t),p=h.ROTATE;break;case s.mouseButtons.ZOOM:if(!1===s.enableZoom)return;!function(t){M.set(t.clientX,t.clientY)}(t),p=h.DOLLY;break;case s.mouseButtons.PAN:if(!1===s.enablePan)return;!function(t){w.set(t.clientX,t.clientY)}(t),p=h.PAN}p!==h.NONE&&(document.addEventListener("mousemove",H,!1),document.addEventListener("mouseup",B,!1),s.dispatchEvent(u))}}function H(t){if(!1!==s.enabled)switch(t.preventDefault(),p){case h.ROTATE:if(!1===s.enableRotate)return;!function(t){_.set(t.clientX,t.clientY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case h.DOLLY:if(!1===s.enableZoom)return;!function(t){S.set(t.clientX,t.clientY),A.subVectors(S,M),A.y>0?D(R()):A.y<0&&F(R()),M.copy(S),s.update()}(t);break;case h.PAN:if(!1===s.enablePan)return;!function(t){E.set(t.clientX,t.clientY),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E),s.update()}(t)}}function B(t){!1!==s.enabled&&(document.removeEventListener("mousemove",H,!1),document.removeEventListener("mouseup",B,!1),s.dispatchEvent(l),p=h.NONE)}function z(t){!1===s.enabled||!1===s.enableZoom||p!==h.NONE&&p!==h.ROTATE||(t.preventDefault(),t.stopPropagation(),s.dispatchEvent(u),function(t){t.deltaY<0?F(R()):t.deltaY>0&&D(R()),s.update()}(t),s.dispatchEvent(l))}function k(t){!1!==s.enabled&&!1!==s.enableKeys&&!1!==s.enablePan&&function(t){switch(t.keyCode){case s.keys.UP:I(0,s.keyPanSpeed),s.update();break;case s.keys.BOTTOM:I(0,-s.keyPanSpeed),s.update();break;case s.keys.LEFT:I(s.keyPanSpeed,0),s.update();break;case s.keys.RIGHT:I(-s.keyPanSpeed,0),s.update()}}(t)}function G(t){if(!1!==s.enabled){switch(t.preventDefault(),t.touches.length){case 1:if(!1===s.enableRotate)return;!function(t){b.set(t.touches[0].pageX,t.touches[0].pageY)}(t),p=h.TOUCH_ROTATE;break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);M.set(0,r)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);w.set(i,o)}}(t),p=h.TOUCH_DOLLY_PAN;break;default:p=h.NONE}p!==h.NONE&&s.dispatchEvent(u)}}function j(t){if(!1!==s.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===s.enableRotate)return;if(p!==h.TOUCH_ROTATE)return;!function(t){_.set(t.touches[0].pageX,t.touches[0].pageY),x.subVectors(_,b).multiplyScalar(s.rotateSpeed);var e=s.domElement===document?s.domElement.body:s.domElement;C(2*Math.PI*x.x/e.clientWidth),L(2*Math.PI*x.y/e.clientHeight),b.copy(_),s.update()}(t);break;case 2:if(!1===s.enableZoom&&!1===s.enablePan)return;if(p!==h.TOUCH_DOLLY_PAN)return;!function(t){if(s.enableZoom){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);S.set(0,r),A.set(0,Math.pow(S.y/M.y,s.zoomSpeed)),D(A.y),M.copy(S)}if(s.enablePan){var i=.5*(t.touches[0].pageX+t.touches[1].pageX),o=.5*(t.touches[0].pageY+t.touches[1].pageY);E.set(i,o),T.subVectors(E,w).multiplyScalar(s.panSpeed),I(T.x,T.y),w.copy(E)}s.update()}(t);break;default:p=h.NONE}}function V(t){!1!==s.enabled&&(s.dispatchEvent(l),p=h.NONE)}function W(t){!1!==s.enabled&&t.preventDefault()}s.domElement.addEventListener("contextmenu",W,!1),s.domElement.addEventListener("mousedown",U,!1),s.domElement.addEventListener("wheel",z,!1),s.domElement.addEventListener("touchstart",G,!1),s.domElement.addEventListener("touchend",V,!1),s.domElement.addEventListener("touchmove",j,!1),window.addEventListener("keydown",k,!1),this.update()},THREE.OrbitControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.OrbitControls.prototype.constructor=THREE.OrbitControls,Object.defineProperties(THREE.OrbitControls.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}})},function(t,e){!function(){function t(t){var e,n=t.Content,r=t.RelativeFilename||t.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":e="image/bmp";break;case"jpg":case"jpeg":e="image/jpeg";break;case"png":e="image/png";break;case"tif":e="image/tiff";break;case"tga":if("function"!=typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\\.tga$/i,new THREE.TGALoader),e="image/tga";break;default:return void console.warn(\'FBXLoader: Image type "\'+i+\'" is not supported.\')}if("string"==typeof n)return"data:"+e+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:e}))}function e(t,e,n,r){var i=function(t,e,n,r){var i,o,a=e.path,s=r.get(t.id).children;void 0!==s&&s.length>0&&void 0!==n[s[0].ID]&&(0!==(i=n[s[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||e.setPath(void 0));o="tga"===t.FileName.slice(-3).toLowerCase()?THREE.Loader.Handlers.get(".tga").load(i):e.load(i);return e.setPath(a),o}(t,e,n,r);i.ID=t.id,i.name=t.attrName;var o=t.WrapModeU,a=t.WrapModeV,s=void 0!==o?o.value:0,c=void 0!==a?a.value:0;if(i.wrapS=0===s?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,i.wrapT=0===c?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in t){var u=t.Scaling.value;i.repeat.x=u[0],i.repeat.y=u[1]}return i}function n(t,e,n,i){var o=e.id,a=e.attrName,s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!i.has(o))return null;var c,u=function(t,e,n,i,o){var a={};e.BumpFactor&&(a.bumpScale=e.BumpFactor.value);e.Diffuse?a.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(a.color=(new THREE.Color).fromArray(e.DiffuseColor.value));e.DisplacementFactor&&(a.displacementScale=e.DisplacementFactor.value);e.Emissive?a.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(a.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value));e.EmissiveFactor&&(a.emissiveIntensity=parseFloat(e.EmissiveFactor.value));e.Opacity&&(a.opacity=parseFloat(e.Opacity.value));a.opacity<1&&(a.transparent=!0);e.ReflectionFactor&&(a.reflectivity=e.ReflectionFactor.value);e.Shininess&&(a.shininess=e.Shininess.value);e.Specular?a.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(a.specular=(new THREE.Color).fromArray(e.SpecularColor.value));return o.get(i).children.forEach(function(e){var i=e.relationship;switch(i){case"Bump":a.bumpMap=n.get(e.ID);break;case"DiffuseColor":a.map=r(t,n,e.ID,o);break;case"DisplacementColor":a.displacementMap=r(t,n,e.ID,o);break;case"EmissiveColor":a.emissiveMap=r(t,n,e.ID,o);break;case"NormalMap":a.normalMap=r(t,n,e.ID,o);break;case"ReflectionColor":a.envMap=r(t,n,e.ID,o),a.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":a.specularMap=r(t,n,e.ID,o);break;case"TransparentColor":a.alphaMap=r(t,n,e.ID,o),a.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",i)}}),a}(t,e,n,o,i);switch(s.toLowerCase()){case"phong":c=new THREE.MeshPhongMaterial;break;case"lambert":c=new THREE.MeshLambertMaterial;break;default:console.warn(\'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.\',s),c=new THREE.MeshPhongMaterial({color:3342591})}return c.setValues(u),c.name=a,c}function r(t,e,n,r){return"LayeredTexture"in t.Objects&&n in t.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),n=r.get(n).children[0].ID),e.get(n)}function i(t,e){var n=[];return t.children.forEach(function(t){var r=e[t.ID];if("Cluster"===r.attrType){var i={ID:t.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}}),{rawBones:n,bones:[]}}function o(t,e,n,r){for(var i=[],o=0;o<t.children.length;o++){if(8===o){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var a=t.children[o],s=n[a.ID],c={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;r.get(parseInt(a.ID)).children.forEach(function(t){"DeformPercent"===t.relationship?c.weightCurveID=t.ID:c.geoID=t.ID}),i.push(c)}return i}function a(t,e,n,r){switch(n.attrType){case"Mesh":return function(t,e,n,r){var i=r.skeletons,o=r.morphTargets,a=e.parents.map(function(e){return t.Objects.Model[e.ID]});if(0===a.length)return;var u=e.children.reduce(function(t,e){return void 0!==i[e.ID]&&(t=i[e.ID]),t},null),l=e.children.reduce(function(t,e){return void 0!==o[e.ID]&&(t=o[e.ID]),t},null),h=new THREE.Matrix4,p=a[0];if("GeometricRotation"in p){var d=p.GeometricRotation.value.map(THREE.Math.degToRad);d[3]="ZYX",h.makeRotationFromEuler((new THREE.Euler).fromArray(d))}"GeometricTranslation"in p&&h.setPosition((new THREE.Vector3).fromArray(p.GeometricTranslation.value));"GeometricScaling"in p&&h.scale((new THREE.Vector3).fromArray(p.GeometricScaling.value));return function(t,e,n,r,i){var o=new THREE.BufferGeometry;e.attrName&&(o.name=e.attrName);var a=function(t,e){var n={};n.vertexPositions=void 0!==t.Vertices?t.Vertices.a:[],n.vertexIndices=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],t.LayerElementColor&&(n.color=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Colors.a,i=[];"IndexToDirect"===n&&(i=t.ColorIndex.a);return{dataSize:4,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementColor[0]));t.LayerElementMaterial&&(n.material=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType;if("NoMappingInformation"===e)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=t.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementMaterial[0]));t.LayerElementNormal&&(n.normal=function(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.Normals.a,i=[];"IndexToDirect"===n&&("NormalIndex"in t?i=t.NormalIndex.a:"NormalsIndex"in t&&(i=t.NormalsIndex.a));return{dataSize:3,buffer:r,indices:i,mappingType:e,referenceType:n}}(t.LayerElementNormal[0]));if(t.LayerElementUV){n.uv=[];for(var r=0;t.LayerElementUV[r];)n.uv.push(c(t.LayerElementUV[r])),r++}n.weightTable={},null!==e&&(n.skeleton=e,e.rawBones.forEach(function(t,e){t.indices.forEach(function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:e,weight:t.weights[i]})})}));return n}(e,n),u=s(a),l=new THREE.Float32BufferAttribute(u.vertex,3);i.applyToBufferAttribute(l),o.addAttribute("position",l),u.colors.length>0&&o.addAttribute("color",new THREE.Float32BufferAttribute(u.colors,3));n&&(o.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(u.weightsIndices,4)),o.addAttribute("skinWeight",new THREE.Float32BufferAttribute(u.vertexWeights,4)),o.FBX_Deformer=n);if(u.normal.length>0){var h=new THREE.Float32BufferAttribute(u.normal,3),p=(new THREE.Matrix3).getNormalMatrix(i);p.applyToBufferAttribute(h),o.addAttribute("normal",h)}if(u.uvs.forEach(function(t,e){var n="uv"+(e+1).toString();0===e&&(n="uv"),o.addAttribute(n,new THREE.Float32BufferAttribute(u.uvs[e],2))}),a.material&&"AllSame"!==a.material.mappingType){var d=u.materialIndex[0],f=0;if(u.materialIndex.forEach(function(t,e){t!==d&&(o.addGroup(f,e-f,d),d=t,f=e)}),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==u.materialIndex.length&&o.addGroup(v,u.materialIndex.length-v,d)}0===o.groups.length&&o.addGroup(0,u.materialIndex.length,u.materialIndex[0])}return function(t,e,n,r,i){null!==r&&(e.morphAttributes.position=[],e.morphAttributes.normal=[],r.rawTargets.forEach(function(r){var o=t.Objects.Geometry[r.geoID];void 0!==o&&function(t,e,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],a=void 0!==e.Vertices?e.Vertices.a.slice():[],c=void 0!==n.Vertices?n.Vertices.a:[],u=void 0!==n.Indexes?n.Indexes.a:[],l=0;l<u.length;l++){var h=3*u[l];a[h]+=c[3*l],a[h+1]+=c[3*l+1],a[h+2]+=c[3*l+2]}var p=s({vertexIndices:o,vertexPositions:a}),d=new THREE.Float32BufferAttribute(p.vertex,3);d.name=n.attrName,r.applyToBufferAttribute(d),t.morphAttributes.position.push(d)}(e,n,o,i)}))}(t,o,e,r,i),o}(t,n,u,l,h)}(t,e,n,r);case"NurbsCurve":return function(t){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var e=parseInt(t.Order);if(isNaN(e))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",t.Order,t.id),new THREE.BufferGeometry;for(var n,r,i=e-1,o=t.KnotVector.a,a=[],s=t.Points.a,c=0,u=s.length;c<u;c+=4)a.push((new THREE.Vector4).fromArray(s,c));if("Closed"===t.Form)a.push(a[0]);else if("Periodic"===t.Form){n=i,r=o.length-1-n;for(var c=0;c<i;++c)a.push(a[c])}var l=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*l.length);l.forEach(function(t,e){t.toArray(h,3*e)});var p=new THREE.BufferGeometry;return p.addAttribute("position",new THREE.BufferAttribute(h,3)),p}(n)}}function s(t){var e={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],c=[],u=[],h=[];return t.vertexIndices.forEach(function(p,d){var f=!1;p<0&&(p^=-1,f=!0);var m=[],v=[];if(o.push(3*p,3*p+1,3*p+2),t.color){var g=l(d,n,p,t.color);s.push(g[0],g[1],g[2])}if(t.skeleton){if(void 0!==t.weightTable[p]&&t.weightTable[p].forEach(function(t){v.push(t.weight),m.push(t.id)}),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(t,e){var n=t,r=m[e];b.forEach(function(t,e,i){if(n>t){i[e]=n,n=t;var o=y[e];y[e]=r,r=o}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(var _=0;_<4;++_)u.push(v[_]),h.push(m[_])}if(t.normal){g=l(d,n,p,t.normal);a.push(g[0],g[1],g[2])}if(t.material&&"AllSame"!==t.material.mappingType)var x=l(d,n,p,t.material)[0];t.uv&&t.uv.forEach(function(t,e){var r=l(d,n,p,t);void 0===c[e]&&(c[e]=[]),c[e].push(r[0]),c[e].push(r[1])}),r++,f&&(!function(t,e,n,r,i,o,a,s,c,u){for(var l=2;l<u;l++)t.vertex.push(e.vertexPositions[n[0]]),t.vertex.push(e.vertexPositions[n[1]]),t.vertex.push(e.vertexPositions[n[2]]),t.vertex.push(e.vertexPositions[n[3*(l-1)]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+1]]),t.vertex.push(e.vertexPositions[n[3*(l-1)+2]]),t.vertex.push(e.vertexPositions[n[3*l]]),t.vertex.push(e.vertexPositions[n[3*l+1]]),t.vertex.push(e.vertexPositions[n[3*l+2]]),e.skeleton&&(t.vertexWeights.push(s[0]),t.vertexWeights.push(s[1]),t.vertexWeights.push(s[2]),t.vertexWeights.push(s[3]),t.vertexWeights.push(s[4*(l-1)]),t.vertexWeights.push(s[4*(l-1)+1]),t.vertexWeights.push(s[4*(l-1)+2]),t.vertexWeights.push(s[4*(l-1)+3]),t.vertexWeights.push(s[4*l]),t.vertexWeights.push(s[4*l+1]),t.vertexWeights.push(s[4*l+2]),t.vertexWeights.push(s[4*l+3]),t.weightsIndices.push(c[0]),t.weightsIndices.push(c[1]),t.weightsIndices.push(c[2]),t.weightsIndices.push(c[3]),t.weightsIndices.push(c[4*(l-1)]),t.weightsIndices.push(c[4*(l-1)+1]),t.weightsIndices.push(c[4*(l-1)+2]),t.weightsIndices.push(c[4*(l-1)+3]),t.weightsIndices.push(c[4*l]),t.weightsIndices.push(c[4*l+1]),t.weightsIndices.push(c[4*l+2]),t.weightsIndices.push(c[4*l+3])),e.color&&(t.colors.push(o[0]),t.colors.push(o[1]),t.colors.push(o[2]),t.colors.push(o[3*(l-1)]),t.colors.push(o[3*(l-1)+1]),t.colors.push(o[3*(l-1)+2]),t.colors.push(o[3*l]),t.colors.push(o[3*l+1]),t.colors.push(o[3*l+2])),e.material&&"AllSame"!==e.material.mappingType&&(t.materialIndex.push(r),t.materialIndex.push(r),t.materialIndex.push(r)),e.normal&&(t.normal.push(i[0]),t.normal.push(i[1]),t.normal.push(i[2]),t.normal.push(i[3*(l-1)]),t.normal.push(i[3*(l-1)+1]),t.normal.push(i[3*(l-1)+2]),t.normal.push(i[3*l]),t.normal.push(i[3*l+1]),t.normal.push(i[3*l+2])),e.uv&&e.uv.forEach(function(e,n){void 0===t.uvs[n]&&(t.uvs[n]=[]),t.uvs[n].push(a[n][0]),t.uvs[n].push(a[n][1]),t.uvs[n].push(a[n][2*(l-1)]),t.uvs[n].push(a[n][2*(l-1)+1]),t.uvs[n].push(a[n][2*l]),t.uvs[n].push(a[n][2*l+1])})}(e,t,o,x,a,s,c,u,h,r),n++,r=0,o=[],a=[],s=[],c=[],u=[],h=[])}),e}function c(t){var e=t.MappingInformationType,n=t.ReferenceInformationType,r=t.UV.a,i=[];return"IndexToDirect"===n&&(i=t.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:e,referenceType:n}}THREE.FBXLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},Object.assign(THREE.FBXLoader.prototype,{load:function(t,e,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(t,function(n){try{var a=i.parse(n,o);e(a)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemError(t)},0)}},n,r)},parse:function(r,s){var c,u,l;if(l="Kaydara FBX Binary  \\0",(u=r).byteLength>=l.length&&l===C(u,0,l.length))c=(new E).parse(r);else{var y=C(r);if(!function(t){var e=["K","a","y","d","a","r","a","\\\\","F","B","X","\\\\","B","i","n","a","r","y","\\\\","\\\\"],n=0;function r(e){var r=t[e-1];return t=t.slice(n+e),n++,r}for(var i=0;i<e.length;++i){var o=r(1);if(o===e[i])return!1}return!0}(y))throw new Error("THREE.FBXLoader: Unknown format.");if(S(y)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+S(y));c=(new w).parse(y)}var b=function(t){var e=new Map;if("Connections"in t){var n=t.Connections.connections;n.forEach(function(t){var n=t[0],r=t[1],i=t[2];e.has(n)||e.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};e.get(n).parents.push(o),e.has(r)||e.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};e.get(r).children.push(a)})}return e}(c),_=function(e){var n={},r={};if("Video"in e.Objects){var i=e.Objects.Video;for(var o in i){var a=i[o],s=parseInt(o);if(n[s]=a.RelativeFilename||a.Filename,"Content"in a){var c=a.Content instanceof ArrayBuffer&&a.Content.byteLength>0,u="string"==typeof a.Content&&""!==a.Content;if(c||u){var l=t(i[o]);r[a.RelativeFilename||a.Filename]=l}}}}for(var s in n){var h=n[s];void 0!==r[h]?n[s]=r[h]:n[s]=n[s].split("\\\\").pop()}return n}(c),x=function(t,e,r){var i=new Map;if("Material"in t.Objects){var o=t.Objects.Material;for(var a in o){var s=n(t,o[a],e,r);null!==s&&i.set(parseInt(a),s)}}return i}(c,function(t,n,r,i){var o=new Map;if("Texture"in t.Objects){var a=t.Objects.Texture;for(var s in a){var c=e(a[s],n,r,i);o.set(parseInt(s),c)}}return o}(c,new THREE.TextureLoader(this.manager).setPath(s),_,b),b),T=function(t,e){var n={},r={};if("Deformer"in t.Objects){var a=t.Objects.Deformer;for(var s in a){var c=a[s],u=e.get(parseInt(s));if("Skin"===c.attrType){var l=i(u,a);l.ID=s,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=u.parents[0].ID,n[s]=l}else if("BlendShape"===c.attrType){var h={id:s};h.rawTargets=o(u,c,a,e),h.id=s,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),h.parentGeoID=u.parents[0].ID,r[s]=h}}}return{skeletons:n,morphTargets:r}}(c,b),M=function(t,e,n){var r=new Map;if("Geometry"in t.Objects){var i=t.Objects.Geometry;for(var o in i){var s=e.get(parseInt(o)),c=a(t,s,i[o],n);r.set(parseInt(o),c)}}return r}(c,b,T);return function(t,e,n,r,i){var o=new THREE.Group,a=function(t,e,n,r,i){var o=new Map,a=t.Objects.Model;for(var s in a){var c=parseInt(s),u=a[s],l=i.get(c),g=h(l,e,c,u.attrName);if(!g){switch(u.attrType){case"Camera":g=p(t,l);break;case"Light":g=d(t,l);break;case"Mesh":g=f(t,l,n,r);break;case"NurbsCurve":g=m(l,n);break;case"LimbNode":case"Null":default:g=new THREE.Group}g.name=THREE.PropertyBinding.sanitizeNodeName(u.attrName),g.ID=c}v(t,g,u),o.set(c,g)}return o}(t,n,r,i,e),s=t.Objects.Model;return a.forEach(function(n){var r=s[n.ID];!function(t,e,n,r,i){if("LookAtProperty"in n){var o=r.get(e.ID).children;o.forEach(function(n){if("LookAtProperty"===n.relationship){var r=t.Objects.Model[n.ID];if("Lcl_Translation"in r){var o=r.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),i.add(e.target)):e.lookAt((new THREE.Vector3).fromArray(o))}}})}}(t,n,r,e,o),e.get(n.ID).parents.forEach(function(t){var e=a.get(t.ID);void 0!==e&&e.add(n)}),null===n.parent&&o.add(n)}),function(t,e,n,r,i){var o=function(t){var e={};if("Pose"in t.Objects){var n=t.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach(function(t){e[t.Node]=(new THREE.Matrix4).fromArray(t.Matrix.a)}):e[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return e}(t);for(var a in e){var s=e[a],c=i.get(parseInt(s.ID)).parents;c.forEach(function(t){if(n.has(t.ID)){var e=t.ID,a=i.get(e);a.parents.forEach(function(t){if(r.has(t.ID)){var e=r.get(t.ID);e.bind(new THREE.Skeleton(s.bones),o[t.ID])}})}})}}(t,n,r,a,e),function(t,e,n){n.animations=[];var r=function(t,e){if(void 0!==t.Objects.AnimationCurve){var n=function(t){var e=t.Objects.AnimationCurveNode,n=new Map;for(var r in e){var i=e[r];if(null!==i.attrName.match(/S|R|T/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n}(t);!function(t,e,n){var r=t.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(A),values:r[i].KeyValueFloat.a},a=e.get(o.id);if(void 0!==a){var s=a.parents[0].ID,c=a.parents[0].relationship;c.match(/X/)?n.get(s).curves.x=o:c.match(/Y/)?n.get(s).curves.y=o:c.match(/Z/)&&(n.get(s).curves.z=o)}}}(t,e,n);var r=function(t,e,n){var r=t.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=e.get(parseInt(o));if(void 0!==s){var c=s.children;c.forEach(function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){var s;e.get(r.ID).parents.forEach(function(t){void 0!==t.relationship&&(s=t.ID)});var c=t.Objects.Model[s.toString()],u={modelName:THREE.PropertyBinding.sanitizeNodeName(c.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in c&&(u.initialPosition=c.Lcl_Translation.value),"Lcl_Rotation"in c&&(u.initialRotation=c.Lcl_Rotation.value),"Lcl_Scaling"in c&&(u.initialScale=c.Lcl_Scaling.value),"PreRotation"in c&&(u.preRotations=c.PreRotation.value),a[i]=u}a[i][o.attr]=o}}}),i.set(parseInt(o),a)}}return i}(t,e,n);return function(t,e,n){var r=t.Objects.AnimationStack,i={};for(var o in r){var a=e.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i}(t,e,r)}}(t,e);if(void 0!==r)for(var i in r){var o=r[i],a=g(o);n.animations.push(a)}}(t,e,o),function(t,e){if("GlobalSettings"in t&&"AmbientColor"in t.GlobalSettings){var n=t.GlobalSettings.AmbientColor.value,r=n[0],i=n[1],o=n[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);e.add(new THREE.AmbientLight(a,1))}}}(t,o),o}(c,b,T.skeletons,M,x)}});var u=[];function l(t,e,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=t;break;case"ByPolygon":i=e;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(t,e,n,r){for(var i=n,o=0;i<r;i++,o++)t[o]=e[i];return t}(u,r.buffer,o,a)}function h(t,e,n,r){var i=null;return t.parents.forEach(function(t){for(var o in e){var a=e[o];a.rawBones.forEach(function(e,o){if(e.ID===t.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(e.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}})}}),i}function p(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,c=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,c=r.AspectHeight.value);var u=s/c,l=45;void 0!==r.FieldOfView&&(l=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(l,u,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,c/2,-c/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n}function d(t,e){var n,r;if(e.children.forEach(function(e){var n=t.Objects.NodeAttribute[e.ID];void 0!==n&&(r=n)}),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var c=Math.PI/3;void 0!==r.InnerAngle&&(c=THREE.Math.degToRad(r.InnerAngle.value));var u=0;void 0!==r.OuterAngle&&(u=THREE.Math.degToRad(r.OuterAngle.value),u=Math.max(u,1)),n=new THREE.SpotLight(o,a,s,c,u,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n}function f(t,e,n,r){var i,o=null,a=null,s=[];return e.children.forEach(function(t){n.has(t.ID)&&(o=n.get(t.ID)),r.has(t.ID)&&s.push(r.get(t.ID))}),s.length>1?a=s:s.length>0?a=s[0]:(a=new THREE.MeshPhongMaterial({color:13421772}),s.push(a)),"color"in o.attributes&&s.forEach(function(t){t.vertexColors=THREE.VertexColors}),o.FBX_Deformer?(s.forEach(function(t){t.skinning=!0}),i=new THREE.SkinnedMesh(o,a)):i=new THREE.Mesh(o,a),i}function m(t,e){var n=t.children.reduce(function(t,n){return e.has(n.ID)&&(t=e.get(n.ID)),t},null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)}function v(t,e,n){if("RotationOrder"in n){var r=parseInt(n.RotationOrder.value,10);r>0&&r<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][r]):6===r&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in n&&e.position.fromArray(n.Lcl_Translation.value),"Lcl_Rotation"in n){var i=n.Lcl_Rotation.value.map(THREE.Math.degToRad);i.push("ZYX"),e.quaternion.setFromEuler((new THREE.Euler).fromArray(i))}if("Lcl_Scaling"in n&&e.scale.fromArray(n.Lcl_Scaling.value),"PreRotation"in n){var o=n.PreRotation.value.map(THREE.Math.degToRad);o[3]="ZYX";var a=(new THREE.Euler).fromArray(o);a=(new THREE.Quaternion).setFromEuler(a),e.quaternion.premultiply(a)}}function g(t){var e=[];return t.layer.forEach(function(t){e=e.concat(function(t){var e=[];if(void 0!==t.T&&Object.keys(t.T.curves).length>0){var n=y(t.modelName,t.T.curves,t.initialPosition,"position");void 0!==n&&e.push(n)}if(void 0!==t.R&&Object.keys(t.R.curves).length>0){var r=function(t,e,n,r){void 0!==e.x&&(x(e.x),e.x.values=e.x.values.map(THREE.Math.degToRad));void 0!==e.y&&(x(e.y),e.y.values=e.y.values.map(THREE.Math.degToRad));void 0!==e.z&&(x(e.z),e.z.values=e.z.values.map(THREE.Math.degToRad));var i=_(e),o=b(i,e,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r));for(var a=new THREE.Quaternion,s=new THREE.Euler,c=[],u=0;u<o.length;u+=3)s.set(o[u],o[u+1],o[u+2],"ZYX"),a.setFromEuler(s),void 0!==r&&a.premultiply(r),a.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(t+".quaternion",i,c)}(t.modelName,t.R.curves,t.initialRotation,t.preRotations);void 0!==r&&e.push(r)}if(void 0!==t.S&&Object.keys(t.S.curves).length>0){var i=y(t.modelName,t.S.curves,t.initialScale,"scale");void 0!==i&&e.push(i)}return e}(t))}),new THREE.AnimationClip(t.name,-1,e)}function y(t,e,n,r){var i=_(e),o=b(i,e,n);return new THREE.VectorKeyframeTrack(t+"."+r,i,o)}function b(t,e,n){var r=n,i=[],o=-1,a=-1,s=-1;return t.forEach(function(t){if(e.x&&(o=e.x.times.indexOf(t)),e.y&&(a=e.y.times.indexOf(t)),e.z&&(s=e.z.times.indexOf(t)),-1!==o){var n=e.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var c=e.y.values[a];i.push(c),r[1]=c}else i.push(r[1]);if(-1!==s){var u=e.z.values[s];i.push(u),r[2]=u}else i.push(r[2])}),i}function _(t){var e=[];return void 0!==t.x&&(e=e.concat(t.x.times)),void 0!==t.y&&(e=e.concat(t.y.times)),void 0!==t.z&&(e=e.concat(t.z.times)),e=e.sort(function(t,e){return t-e}).filter(function(t,e,n){return n.indexOf(t)==e})}function x(t){for(var e=1;e<t.values.length;e++){var n=t.values[e-1],r=t.values[e]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,c=t.times[e-1],u=(t.times[e]-c)/o,l=c+u,h=[],p=[];l<t.times[e];)h.push(l),l+=u,p.push(s),s+=a;t.times=L(t.times,e,h),t.values=L(t.values,e,p)}}}function w(){}function E(){}function T(t,e){this.dv=new DataView(t),this.offset=0,this.littleEndian=void 0===e||e}function M(){}function S(t){var e=t.match(/FBXVersion: (\\d+)/);if(e)return parseInt(e[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function A(t){return t/46186158e3}function R(t){return t.split(",").map(function(t){return parseFloat(t)})}function C(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=t.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(t,e,n))}function L(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}Object.assign(w.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(t){this.nodeStack.push(t),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(t,e){this.currentProp=t,this.currentPropName=e},parse:function(t){this.currentIndent=0,this.allNodes=new M,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var e=this,n=t.split("\\n");return n.forEach(function(t,r){var i=t.match(/^[\\s\\t]*;/),o=t.match(/^[\\s\\t]*$/);if(!i&&!o){var a=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):(.*){",""),s=t.match("^\\\\t{"+e.currentIndent+"}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)"),c=t.match("^\\\\t{"+(e.currentIndent-1)+"}}");a?e.parseNodeBegin(t,a):s?e.parseNodeProperty(t,s,n[++r]):c?e.popStack():t.match(/^[^\\s\\t}]/)&&e.parseNodePropertyContinued(t)}}),this.allNodes},parseNodeBegin:function(t,e){var n=e[1].trim().replace(/^"/,"").replace(/"$/,""),r=e[2].split(",").map(function(t){return t.trim().replace(/^"/,"").replace(/"$/,"")}),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"==typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"==typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(t){var e=t[0];""!==t[0]&&(e=parseInt(t[0]),isNaN(e)&&(e=t[0]));var n="",r="";return t.length>1&&(n=t[1].replace(/^(\\w+)::/,""),r=t[2]),{id:e,name:n,type:r}},parseNodeProperty:function(t,e,n){var r=e[1].replace(/^"/,"").replace(/"$/,"").trim(),i=e[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),c=parseInt(a[1]),u=i.split(",").slice(3);r="connections",function(t,e){for(var n=0,r=t.length,i=e.length;n<i;n++,r++)t[r]=e[n]}(i=[s,c],u=u.map(function(t){return t.trim().replace(/^"/,"")})),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=R(i))}else this.parseNodeSpecialProperty(t,r,i)},parseNodePropertyContinued:function(t){var e=this.getCurrentNode();e.a+=t,","!==t.slice(-1)&&(e.a=R(e.a))},parseNodeSpecialProperty:function(t,e,n){var r=n.split(\'",\').map(function(t){return t.trim().replace(/^\\"/,"").replace(/\\s/,"_")}),i=r[0],o=r[1],a=r[2],s=r[3],c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=R(c)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:c},this.setCurrentProp(this.getPrevNode(),i)}}),Object.assign(E.prototype,{parse:function(t){var e=new T(t);e.skip(23);var n=e.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new M;!this.endOfContent(e);){var i=this.parseNode(e,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(t){return t.size()%16==0?(t.getOffset()+160+16&-16)>=t.size():t.getOffset()+160+16>=t.size()},parseNode:function(t,e){var n={},r=e>=7500?t.getUint64():t.getUint32(),i=e>=7500?t.getUint64():t.getUint32(),o=(e>=7500?t.getUint64():t.getUint32(),t.getUint8()),a=t.getString(o);if(0===r)return null;for(var s=[],c=0;c<i;c++)s.push(this.parseProperty(t));var u=s.length>0?s[0]:"",l=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&t.getOffset()===r;r>t.getOffset();){var p=this.parseNode(t,e);null!==p&&this.parseSubNode(a,n,p)}return n.propertyList=s,"number"==typeof u&&(n.id=u),""!==l&&(n.attrName=l),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(t,e,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(e[n.name]=n,n.a=r):e[n.name]=r}else if("Connections"===t&&"C"===n.name){var i=[];n.propertyList.forEach(function(t,e){0!==e&&i.push(t)}),void 0===e.connections&&(e.connections=[]),e.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach(function(t){e[t]=n[t]})}else if("Properties70"===t&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],u=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],e[a]={type:s,type2:c,flag:u,value:o}}else void 0===e[n.name]?"number"==typeof n.id?(e[n.name]={},e[n.name][n.id]=n):e[n.name]=n:"PoseNode"===n.name?(Array.isArray(e[n.name])||(e[n.name]=[e[n.name]]),e[n.name].push(n)):void 0===e[n.name][n.id]&&(e[n.name][n.id]=n)},parseProperty:function(t){var e=t.getString(1);switch(e){case"C":return t.getBoolean();case"D":return t.getFloat64();case"F":return t.getFloat32();case"I":return t.getInt32();case"L":return t.getInt64();case"R":var n=t.getUint32();return t.getArrayBuffer(n);case"S":n=t.getUint32();return t.getString(n);case"Y":return t.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=t.getUint32(),i=t.getUint32(),o=t.getUint32();if(0===i)switch(e){case"b":case"c":return t.getBooleanArray(r);case"d":return t.getFloat64Array(r);case"f":return t.getFloat32Array(r);case"i":return t.getInt32Array(r);case"l":return t.getInt64Array(r)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new T(new Zlib.Inflate(new Uint8Array(t.getArrayBuffer(o))).decompress().buffer);switch(e){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+e)}}}),Object.assign(T.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(t){this.offset+=t},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getBoolean());return e},getUint8:function(){var t=this.dv.getUint8(this.offset);return this.offset+=1,t},getInt16:function(){var t=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},getInt32:function(){var t=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},getInt32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt32());return e},getUint32:function(){var t=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},getInt64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),2147483648&e?(e=4294967295&~e,4294967295===(t=4294967295&~t)&&(e=e+1&4294967295),-(4294967296*e+(t=t+1&4294967295))):4294967296*e+t},getInt64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getInt64());return e},getUint64:function(){var t,e;return this.littleEndian?(t=this.getUint32(),e=this.getUint32()):(e=this.getUint32(),t=this.getUint32()),4294967296*e+t},getFloat32:function(){var t=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},getFloat32Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat32());return e},getFloat64:function(){var t=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},getFloat64Array:function(t){for(var e=[],n=0;n<t;n++)e.push(this.getFloat64());return e},getArrayBuffer:function(t){var e=this.dv.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},getString:function(t){for(var e=new Uint8Array(t),n=0;n<t;n++)e[n]=this.getUint8();var r=e.indexOf(0);return r>=0&&(e=e.slice(0,r)),THREE.LoaderUtils.decodeText(e)}}),Object.assign(M.prototype,{add:function(t,e){this[t]=e}})}()},function(t,e){THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MTLLoader.prototype={constructor:THREE.MTLLoader,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(this.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setTexturePath:function(t){return this.texturePath=t,this},setBaseUrl:function(t){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(t)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setMaterialOptions:function(t){return this.materialOptions=t,this},parse:function(t){for(var e=t.split("\\n"),n={},r=/\\s+/,i={},o=0;o<e.length;o++){var a=e[o];if(0!==(a=a.trim()).length&&"#"!==a.charAt(0)){var s=a.indexOf(" "),c=s>=0?a.substring(0,s):a;c=c.toLowerCase();var u=s>=0?a.substring(s+1):"";if(u=u.trim(),"newmtl"===c)n={name:u},i[u]=n;else if(n)if("ka"===c||"kd"===c||"ks"===c){var l=u.split(r,3);n[c]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else n[c]=u}}var h=new THREE.MTLLoader.MaterialCreator(this.texturePath||this.path,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(i),h}},THREE.MTLLoader.MaterialCreator=function(t,e){this.baseUrl=t||"",this.options=e,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(t){this.crossOrigin=t},setManager:function(t){this.manager=t},setMaterials:function(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(t){if(!this.options)return t;var e={};for(var n in t){var r=t[n],i={};for(var o in e[n]=i,r){var a=!0,s=r[o],c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[c]=s)}}return e},preload:function(){for(var t in this.materialsInfo)this.create(t)},getIndex:function(t){return this.nameLookup[t]},getAsArray:function(){var t=0;for(var e in this.materialsInfo)this.materialsArray[t]=this.create(e),this.nameLookup[e]=t,t++;return this.materialsArray},create:function(t){return void 0===this.materials[t]&&this.createMaterial_(t),this.materials[t]},createMaterial_:function(t){var e=this,n=this.materialsInfo[t],r={name:t,side:this.side};function i(t,n){if(!r[t]){var i,o,a=e.getTextureParams(n,r),s=e.loadTexture((i=e.baseUrl,"string"!=typeof(o=a.url)||""===o?"":/^https?:\\/\\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=e.wrap,s.wrapT=e.wrap,r[t]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[t]=new THREE.MeshPhongMaterial(r),this.materials[t]},getTextureParams:function(t,e){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=t.split(/\\s+/);return(n=i.indexOf("-bm"))>=0&&(e.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(t,e,n,r,i){var o,a=THREE.Loader.Handlers.get(t),s=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===a&&(a=new THREE.TextureLoader(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin),o=a.load(t,n,r,i),void 0!==e&&(o.mapping=e),o}}},function(t,e){THREE.OBJLoader=function(){var t=/^[og]\\s*(.+)?/,e=/^mtllib /,n=/^usemtl /;function r(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.materials=null}return r.prototype={constructor:r,load:function(t,e,n,r){var i=this,o=new THREE.FileLoader(i.manager);o.setPath(this.path),o.load(t,function(t){e(i.parse(t))},n,r)},setPath:function(t){return this.path=t,this},setMaterials:function(t){return this.materials=t,this},parse:function(r){console.time("OBJLoader");var i=new function(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(t,e){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},n&&n.name&&"function"==typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseNormalIndex:function(t,e){var n=parseInt(t,10);return 3*(n>=0?n-1:n+e/3)},parseUVIndex:function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},addVertex:function(t,e,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addColor:function(t,e,n){var r=this.colors,i=this.object.geometry.colors;i.push(r[t+0],r[t+1],r[t+2]),i.push(r[e+0],r[e+1],r[e+2]),i.push(r[n+0],r[n+1],r[n+2])},addUV:function(t,e,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[t+0],r[t+1]),i.push(r[e+0],r[e+1]),i.push(r[n+0],r[n+1])},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,n,r,i,o,a,s,c){var u=this.vertices.length,l=this.parseVertexIndex(t,u),h=this.parseVertexIndex(e,u),p=this.parseVertexIndex(n,u);if(this.addVertex(l,h,p),void 0!==r&&""!==r){var d=this.uvs.length;l=this.parseUVIndex(r,d),h=this.parseUVIndex(i,d),p=this.parseUVIndex(o,d),this.addUV(l,h,p)}if(void 0!==a&&""!==a){var f=this.normals.length;l=this.parseNormalIndex(a,f),h=a===s?l:this.parseNormalIndex(s,f),p=a===c?l:this.parseNormalIndex(c,f),this.addNormal(l,h,p)}this.colors.length>0&&this.addColor(l,h,p)},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,n=0,r=t.length;n<r;n++)this.addVertexPoint(this.parseVertexIndex(t[n],e))},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=t.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(t[i],n));var a=0;for(o=e.length;a<o;a++)this.addUVLine(this.parseUVIndex(e[a],r))}};return t.startObject("",!1),t};-1!==r.indexOf("\\r\\n")&&(r=r.replace(/\\r\\n/g,"\\n")),-1!==r.indexOf("\\\\\\n")&&(r=r.replace(/\\\\\\n/g,""));for(var o=r.split("\\n"),a="",s="",c=[],u="function"==typeof"".trimLeft,l=0,h=o.length;l<h;l++)if(a=o[l],0!==(a=u?a.trimLeft():a.trim()).length&&"#"!==(s=a.charAt(0)))if("v"===s){var p=a.split(/\\s+/);switch(p[0]){case"v":i.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&i.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":i.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":i.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===s){for(var d=a.substr(1).trim().split(/\\s+/),f=[],m=0,v=d.length;m<v;m++){var g=d[m];if(g.length>0){var y=g.split("/");f.push(y)}}var b=f[0];for(m=1,v=f.length-1;m<v;m++){var _=f[m],x=f[m+1];i.addFace(b[0],_[0],x[0],b[1],_[1],x[1],b[2],_[2],x[2])}}else if("l"===s){var w=a.substring(1).trim().split(" "),E=[],T=[];if(-1===a.indexOf("/"))E=w;else for(var M=0,S=w.length;M<S;M++){var A=w[M].split("/");""!==A[0]&&E.push(A[0]),""!==A[1]&&T.push(A[1])}i.addLineGeometry(E,T)}else if("p"===s){var R=a.substr(1).trim().split(" ");i.addPointGeometry(R)}else if(null!==(c=t.exec(a))){var C=(" "+c[0].substr(1).trim()).substr(1);i.startObject(C)}else if(n.test(a))i.object.startMaterial(a.substring(7).trim(),i.materialLibraries);else if(e.test(a))i.materialLibraries.push(a.substring(7).trim());else{if("s"!==s){if("\\0"===a)continue;throw new Error(\'THREE.OBJLoader: Unexpected line: "\'+a+\'"\')}if((c=a.split(" ")).length>1){var L=c[1].trim().toLowerCase();i.object.smooth="0"!==L&&"off"!==L}else i.object.smooth=!0;(V=i.object.currentMaterial())&&(V.smooth=i.object.smooth)}i.finalize();var P=new THREE.Group;P.materialLibraries=[].concat(i.materialLibraries);for(l=0,h=i.objects.length;l<h;l++){var N=i.objects[l],O=N.geometry,I=N.materials,D="Line"===O.type,F="Points"===O.type,U=!1;if(0!==O.vertices.length){var H=new THREE.BufferGeometry;H.addAttribute("position",new THREE.Float32BufferAttribute(O.vertices,3)),O.normals.length>0?H.addAttribute("normal",new THREE.Float32BufferAttribute(O.normals,3)):H.computeVertexNormals(),O.colors.length>0&&(U=!0,H.addAttribute("color",new THREE.Float32BufferAttribute(O.colors,3))),O.uvs.length>0&&H.addAttribute("uv",new THREE.Float32BufferAttribute(O.uvs,2));for(var B,z=[],k=0,G=I.length;k<G;k++){var j=I[k],V=void 0;if(null!==this.materials)if(V=this.materials.create(j.name),!D||!V||V instanceof THREE.LineBasicMaterial){if(F&&V&&!(V instanceof THREE.PointsMaterial)){var W=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});X.copy(V),V=W}}else{var X=new THREE.LineBasicMaterial;X.copy(V),X.lights=!1,V=X}V||((V=D?new THREE.LineBasicMaterial:F?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=j.name),V.flatShading=!j.smooth,V.vertexColors=U?THREE.VertexColors:THREE.NoColors,z.push(V)}if(z.length>1){for(k=0,G=I.length;k<G;k++){j=I[k];H.addGroup(j.groupStart,j.groupCount,k)}B=D?new THREE.LineSegments(H,z):F?new THREE.Points(H,z):new THREE.Mesh(H,z)}else B=D?new THREE.LineSegments(H,z[0]):F?new THREE.Points(H,z[0]):new THREE.Mesh(H,z[0]);B.name=N.name,P.add(B)}}return console.timeEnd("OBJLoader"),P}},r}()},function(t,e){THREE.GLTFLoader=function(){function t(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.dracoLoader=null}t.prototype={constructor:t,crossOrigin:"Anonymous",load:function(t,e,n,r){var i=this,o=void 0!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),a=new THREE.FileLoader(i.manager);a.setResponseType("arraybuffer"),a.load(t,function(t){try{i.parse(t,o,e,r)}catch(t){if(void 0===r)throw t;r(t)}},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this},setDRACOLoader:function(t){return this.dracoLoader=t,this},parse:function(t,s,c,u){var l,h={};if("string"==typeof t)l=t;else if(THREE.LoaderUtils.decodeText(new Uint8Array(t,0,4))===r){try{h[e.KHR_BINARY_GLTF]=new function(t){this.name=e.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(t,0,i);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(t.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==r)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");var a=new DataView(t,i),s=0;for(;s<a.byteLength;){var c=a.getUint32(s,!0);s+=4;var u=a.getUint32(s,!0);if(s+=4,u===o.JSON){var l=new Uint8Array(t,i+s,c);this.content=THREE.LoaderUtils.decodeText(l)}else if(u===o.BIN){var h=i+s;this.body=t.slice(h,h+c)}s+=c}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}(t)}catch(t){return void(u&&u(t))}l=h[e.KHR_BINARY_GLTF].content}else l=THREE.LoaderUtils.decodeText(new Uint8Array(t));var p=JSON.parse(l);void 0===p.asset||p.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(p.extensionsUsed&&(p.extensionsUsed.indexOf(e.KHR_LIGHTS)>=0&&(h[e.KHR_LIGHTS]=new function(t){this.name=e.KHR_LIGHTS,this.lights={};var n=(t.extensions&&t.extensions[e.KHR_LIGHTS]||{}).lights||{};for(var r in n){var i,o=n[r],a=(new THREE.Color).fromArray(o.color);switch(o.type){case"directional":(i=new THREE.DirectionalLight(a)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new THREE.PointLight(a);break;case"spot":i=new THREE.SpotLight(a),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new THREE.AmbientLight(a)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+r,this.lights[r]=i)}}(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_UNLIT)>=0&&(h[e.KHR_MATERIALS_UNLIT]=new n(p)),p.extensionsUsed.indexOf(e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(h[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new function(){return{name:e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return THREE.ShaderMaterial},extendParams:function(t,e,n){var r=e.extensions[this.name],i=THREE.ShaderLib.standard,o=THREE.UniformsUtils.clone(i.uniforms),a=["#ifdef USE_SPECULARMAP","\\tuniform sampler2D specularMap;","#endif"].join("\\n"),s=["#ifdef USE_GLOSSINESSMAP","\\tuniform sampler2D glossinessMap;","#endif"].join("\\n"),c=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\\tvec4 texelSpecular = texture2D( specularMap, vUv );","\\ttexelSpecular = sRGBToLinear( texelSpecular );","\\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\\n"),u=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\\n"),l=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\\n"),h=i.fragmentShader.replace("#include <specularmap_fragment>","").replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",a).replace("#include <metalnessmap_pars_fragment>",s).replace("#include <roughnessmap_fragment>",c).replace("#include <metalnessmap_fragment>",u).replace("#include <lights_physical_fragment>",l);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new THREE.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},t.vertexShader=i.vertexShader,t.fragmentShader=h,t.uniforms=o,t.defines={STANDARD:""},t.color=new THREE.Color(1,1,1),t.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;t.color.fromArray(d),t.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(t,"map",r.diffuseTexture.index)),t.emissive=new THREE.Color(0,0,0),t.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,t.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&t.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture.index;p.push(n.assignTexture(t,"glossinessMap",f)),p.push(n.assignTexture(t,"specularMap",f))}return Promise.all(p)},createMaterial:function(t){var e=new THREE.ShaderMaterial({defines:t.defines,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,fog:!0,lights:!0,opacity:t.opacity,transparent:t.transparent});return e.isGLTFSpecularGlossinessMaterial=!0,e.color=t.color,e.map=void 0===t.map?null:t.map,e.lightMap=null,e.lightMapIntensity=1,e.aoMap=void 0===t.aoMap?null:t.aoMap,e.aoMapIntensity=1,e.emissive=t.emissive,e.emissiveIntensity=1,e.emissiveMap=void 0===t.emissiveMap?null:t.emissiveMap,e.bumpMap=void 0===t.bumpMap?null:t.bumpMap,e.bumpScale=1,e.normalMap=void 0===t.normalMap?null:t.normalMap,t.normalScale&&(e.normalScale=t.normalScale),e.displacementMap=null,e.displacementScale=1,e.displacementBias=0,e.specularMap=void 0===t.specularMap?null:t.specularMap,e.specular=t.specular,e.glossinessMap=void 0===t.glossinessMap?null:t.glossinessMap,e.glossiness=t.glossiness,e.alphaMap=null,e.envMap=void 0===t.envMap?null:t.envMap,e.envMapIntensity=1,e.refractionRatio=.98,e.extensions.derivatives=!0,e},cloneMaterial:function(t){var e=t.clone();e.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r<i;r++)e[n[r]]=t[n[r]];return e},refreshUniforms:function(t,e,n,r,i,o){if(!0===i.isGLTFSpecularGlossinessMaterial){var a,s,c,u=i.uniforms,l=i.defines;if(u.opacity.value=i.opacity,u.diffuse.value.copy(i.color),u.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),u.map.value=i.map,u.specularMap.value=i.specularMap,u.alphaMap.value=i.alphaMap,u.lightMap.value=i.lightMap,u.lightMapIntensity.value=i.lightMapIntensity,u.aoMap.value=i.aoMap,u.aoMapIntensity.value=i.aoMapIntensity,i.map?a=i.map:i.specularMap?a=i.specularMap:i.displacementMap?a=i.displacementMap:i.normalMap?a=i.normalMap:i.bumpMap?a=i.bumpMap:i.glossinessMap?a=i.glossinessMap:i.alphaMap?a=i.alphaMap:i.emissiveMap&&(a=i.emissiveMap),void 0!==a)if(a.isWebGLRenderTarget&&(a=a.texture),void 0!==a.matrix){if(!0===a.matrixAutoUpdate){s=a.offset,c=a.repeat;var h=a.rotation,p=a.center;a.matrix.setUvTransform(s.x,s.y,c.x,c.y,h,p.x,p.y)}u.uvTransform.value.copy(a.matrix)}else s=a.offset,c=a.repeat,u.offsetRepeat.value.set(s.x,s.y,c.x,c.y);u.envMap.value=i.envMap,u.envMapIntensity.value=i.envMapIntensity,u.flipEnvMap.value=i.envMap&&i.envMap.isCubeTexture?-1:1,u.refractionRatio.value=i.refractionRatio,u.specular.value.copy(i.specular),u.glossiness.value=i.glossiness,u.glossinessMap.value=i.glossinessMap,u.emissiveMap.value=i.emissiveMap,u.bumpMap.value=i.bumpMap,u.normalMap.value=i.normalMap,u.displacementMap.value=i.displacementMap,u.displacementScale.value=i.displacementScale,u.displacementBias.value=i.displacementBias,null!==u.glossinessMap.value&&void 0===l.USE_GLOSSINESSMAP&&(l.USE_GLOSSINESSMAP="",l.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==l.USE_GLOSSINESSMAP&&(delete l.USE_GLOSSINESSMAP,delete l.USE_ROUGHNESSMAP)}}}}),p.extensionsUsed.indexOf(e.KHR_DRACO_MESH_COMPRESSION)>=0&&(h[e.KHR_DRACO_MESH_COMPRESSION]=new a(this.dracoLoader)),p.extensionsUsed.indexOf(e.MSFT_TEXTURE_DDS)>=0&&(h[e.MSFT_TEXTURE_DDS]=new function(){if(!THREE.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=e.MSFT_TEXTURE_DDS,this.ddsLoader=new THREE.DDSLoader})),new N(p,h,{path:s||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(function(t,e,n,r,i){c({scene:t,scenes:e,cameras:n,animations:r,asset:i})},u))}};var e={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(t){this.name=e.KHR_MATERIALS_UNLIT}n.prototype.getMaterialType=function(t){return THREE.MeshBasicMaterial},n.prototype.extendParams=function(t,e,n){var r=[];t.color=new THREE.Color(1,1,1),t.opacity=1;var i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;t.color.fromArray(o),t.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(t,"map",i.baseColorTexture.index))}return Promise.all(r)};var r="glTF",i=12,o={JSON:1313821514,BIN:5130562};function a(t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=e.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=t}function s(t,e,n,r){THREE.Interpolant.call(this,t,e,n,r)}a.prototype.decodePrimitive=function(t,e){var n=this.dracoLoader,r=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,o={};for(var a in i)a in x&&(o[x[a]]=i[a]);return e.getDependency("bufferView",r).then(function(t){return new Promise(function(e){n.decodeDracoFile(t,e,o)})})},s.prototype=Object.create(THREE.Interpolant.prototype),s.prototype.constructor=s,s.prototype.interpolate_=function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,c=3*a,u=r-e,l=(n-e)/u,h=l*l,p=h*l,d=t*c,f=d-c,m=2*p-3*h+1,v=p-2*h+l,g=-2*p+3*h,y=p-h,b=0;b!==a;b++){var _=o[f+b+a],x=o[f+b+s]*u,w=o[d+b+a],E=o[d+b]*u;i[b]=m*_+v*x+g*w+y*E}return i};var c=0,u=1,l=2,h=3,p=4,d=5,f=6,m=(Number,THREE.Matrix3,THREE.Matrix4,THREE.Vector2,THREE.Vector3,THREE.Vector4,THREE.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),v={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipMapNearestFilter,9985:THREE.LinearMipMapNearestFilter,9986:THREE.NearestMipMapLinearFilter,9987:THREE.LinearMipMapLinearFilter},g={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},y={6406:THREE.AlphaFormat,6407:THREE.RGBFormat,6408:THREE.RGBAFormat,6409:THREE.LuminanceFormat,6410:THREE.LuminanceAlphaFormat},b={5121:THREE.UnsignedByteType,32819:THREE.UnsignedShort4444Type,32820:THREE.UnsignedShort5551Type,33635:THREE.UnsignedShort565Type},_=(THREE.BackSide,THREE.FrontSide,THREE.NeverDepth,THREE.LessDepth,THREE.EqualDepth,THREE.LessEqualDepth,THREE.GreaterEqualDepth,THREE.NotEqualDepth,THREE.GreaterEqualDepth,THREE.AlwaysDepth,THREE.AddEquation,THREE.SubtractEquation,THREE.ReverseSubtractEquation,THREE.ZeroFactor,THREE.OneFactor,THREE.SrcColorFactor,THREE.OneMinusSrcColorFactor,THREE.SrcAlphaFactor,THREE.OneMinusSrcAlphaFactor,THREE.DstAlphaFactor,THREE.OneMinusDstAlphaFactor,THREE.DstColorFactor,THREE.OneMinusDstColorFactor,THREE.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),x={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},w={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},E={CUBICSPLINE:THREE.InterpolateSmooth,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},T="OPAQUE",M="MASK",S="BLEND";function A(t,e){return"string"!=typeof t||""===t?"":/^(https?:)?\\/\\//i.test(t)?t:/^data:.*,.*$/i.test(t)?t:/^blob:.*$/i.test(t)?t:e+t}function R(t,e,n,r){for(var i=t.geometry,o=n.targets,a=!1,s=!1,c=0,u=o.length;c<u;c++){if(void 0!==(p=o[c]).POSITION&&(a=!0),void 0!==p.NORMAL&&(s=!0),a&&s)break}if(a||s){var l=[],h=[];for(c=0,u=o.length;c<u;c++){var p=o[c],d="morphTarget"+c;if(a){if(void 0!==p.POSITION){var f=P(r[p.POSITION]);f.name=d;for(var m=i.attributes.position,v=0,g=f.count;v<g;v++)f.setXYZ(v,f.getX(v)+m.getX(v),f.getY(v)+m.getY(v),f.getZ(v)+m.getZ(v))}else f=i.attributes.position;l.push(f)}if(s){if(void 0!==p.NORMAL){var y;(y=P(r[p.NORMAL])).name=d;var b=i.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+b.getX(v),y.getY(v)+b.getY(v),y.getZ(v)+b.getZ(v))}else y=i.attributes.normal;h.push(y)}}if(a&&(i.morphAttributes.position=l),s&&(i.morphAttributes.normal=h),t.updateMorphTargets(),void 0!==e.weights)for(c=0,u=e.weights.length;c<u;c++)t.morphTargetInfluences[c]=e.weights[c];if(e.extras&&Array.isArray(e.extras.targetNames)){var _=e.extras.targetNames;if(t.morphTargetInfluences.length===_.length){t.morphTargetDictionary={};for(c=0,u=_.length;c<u;c++)t.morphTargetDictionary[_[c]]=c}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function C(t,e){if(t.indices!==e.indices)return!1;var n=t.attributes||{},r=e.attributes||{},i=Object.keys(n),o=Object.keys(r);if(i.length!==o.length)return!1;for(var a=0,s=i.length;a<s;a++){var c=i[a];if(n[c]!==r[c])return!1}return!0}function L(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(C(i.primitive,e))return i.promise}return null}function P(t){if(t.isInterleavedBufferAttribute){for(var e=t.count,n=t.itemSize,r=t.array.slice(0,e*n),i=0;i<e;++i)r[i]=t.getX(i),n>=2&&(r[i+1]=t.getY(i)),n>=3&&(r[i+2]=t.getZ(i)),n>=4&&(r[i+3]=t.getW(i));return new THREE.BufferAttribute(r,n,t.normalized)}return t.clone()}function N(t,e,n){this.json=t||{},this.extensions=e||{},this.options=n||{},this.cache=new function(){var t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}},this.primitiveCache=[],this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function O(t,e,n){var r=e.attributes;for(var i in r){var o=x[i],a=n[r[i]];o&&(o in t.attributes||t.addAttribute(o,a))}void 0===e.indices||t.index||t.setIndex(n[e.indices])}return N.prototype.parse=function(t,e){var n=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then(function(e){var r=e.scenes||[],i=r[n.scene||0],o=e.animations||[],a=n.asset,s=e.cameras||[];t(i,r,s,o,a)}).catch(e)},N.prototype.markDefs=function(){for(var t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[],r={},i={},o=0,a=e.length;o<a;o++)for(var s=e[o].joints,c=0,u=s.length;c<u;c++)t[s[c]].isBone=!0;for(var l=0,h=t.length;l<h;l++){var p=t[l];void 0!==p.mesh&&(void 0===r[p.mesh]&&(r[p.mesh]=i[p.mesh]=0),r[p.mesh]++,void 0!==p.skin&&(n[p.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},N.prototype.getDependency=function(t,e){var n=t+":"+e,r=this.cache.get(n);if(!r){switch(t){case"scene":r=this.loadScene(e);break;case"node":r=this.loadNode(e);break;case"mesh":r=this.loadMesh(e);break;case"accessor":r=this.loadAccessor(e);break;case"bufferView":r=this.loadBufferView(e);break;case"buffer":r=this.loadBuffer(e);break;case"material":r=this.loadMaterial(e);break;case"texture":r=this.loadTexture(e);break;case"skin":r=this.loadSkin(e);break;case"animation":r=this.loadAnimation(e);break;case"camera":r=this.loadCamera(e);break;default:throw new Error("Unknown type: "+t)}this.cache.add(n,r)}return r},N.prototype.getDependencies=function(t){var e=this.cache.get(t);if(!e){var n=this,r=this.json[t+("mesh"===t?"es":"s")]||[];e=Promise.all(r.map(function(e,r){return n.getDependency(t,r)})),this.cache.add(t,e)}return e},N.prototype.getMultiDependencies=function(t){for(var e={},n=[],r=0,i=t.length;r<i;r++){var o=t[r],a=this.getDependencies(o);a=a.then(function(t,n){e[t]=n}.bind(this,o+("mesh"===o?"es":"s"))),n.push(a)}return Promise.all(n).then(function(){return e})},N.prototype.loadBuffer=function(t){var n=this.json.buffers[t],r=this.fileLoader;if(n.type&&"arraybuffer"!==n.type)throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(void 0===n.uri&&0===t)return Promise.resolve(this.extensions[e.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(t,e){r.load(A(n.uri,i.path),t,void 0,function(){e(new Error(\'THREE.GLTFLoader: Failed to load buffer "\'+n.uri+\'".\'))})})},N.prototype.loadBufferView=function(t){var e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(t){var n=e.byteLength||0,r=e.byteOffset||0;return t.slice(r,r+n)})},N.prototype.loadAccessor=function(t){var e=this,n=this.json,r=this.json.accessors[t];if(void 0===r.bufferView&&void 0===r.sparse)return null;var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then(function(t){var i,o,a=t[0],s=_[r.type],c=m[r.componentType],u=c.BYTES_PER_ELEMENT,l=u*s,h=r.byteOffset||0,p=n.bufferViews[r.bufferView].byteStride,d=!0===r.normalized;if(p&&p!==l){var f="InterleavedBuffer:"+r.bufferView+":"+r.componentType,v=e.cache.get(f);v||(i=new c(a),v=new THREE.InterleavedBuffer(i,p/u),e.cache.add(f,v)),o=new THREE.InterleavedBufferAttribute(v,s,h/u,d)}else i=null===a?new c(r.count*s):new c(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,d);if(void 0!==r.sparse){var g=_.SCALAR,y=m[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,x=r.sparse.values.byteOffset||0,w=new y(t[1],b,r.sparse.count*g),E=new c(t[2],x,r.sparse.count*s);null!==a&&o.setArray(o.array.slice());for(var T=0,M=w.length;T<M;T++){var S=w[T];if(o.setX(S,E[T*s]),s>=2&&o.setY(S,E[T*s+1]),s>=3&&o.setZ(S,E[T*s+2]),s>=4&&o.setW(S,E[T*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o})},N.prototype.loadTexture=function(t){var n,r=this,i=this.json,o=this.options,a=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[t],u=c.extensions||{},l=(n=u[e.MSFT_TEXTURE_DDS]?i.images[u[e.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,h=!1;return void 0!==n.bufferView&&(l=r.getDependency("bufferView",n.bufferView).then(function(t){h=!0;var e=new Blob([t],{type:n.mimeType});return l=s.createObjectURL(e)})),Promise.resolve(l).then(function(t){var n=THREE.Loader.Handlers.get(t);return n||(n=u[e.MSFT_TEXTURE_DDS]?r.extensions[e.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(e,r){n.load(A(t,o.path),e,void 0,r)})}).then(function(t){!0===h&&s.revokeObjectURL(l),t.flipY=!1,void 0!==c.name&&(t.name=c.name),u[e.MSFT_TEXTURE_DDS]||(t.format=void 0!==c.format?y[c.format]:THREE.RGBAFormat),void 0!==c.internalFormat&&t.format!==y[c.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),t.type=void 0!==c.type?b[c.type]:THREE.UnsignedByteType;var n=(i.samplers||{})[c.sampler]||{};return t.magFilter=v[n.magFilter]||THREE.LinearFilter,t.minFilter=v[n.minFilter]||THREE.LinearMipMapLinearFilter,t.wrapS=g[n.wrapS]||THREE.RepeatWrapping,t.wrapT=g[n.wrapT]||THREE.RepeatWrapping,t})},N.prototype.assignTexture=function(t,e,n){return this.getDependency("texture",n).then(function(n){t[e]=n})},N.prototype.loadMaterial=function(t){this.json;var n,r=this.extensions,i=this.json.materials[t],o={},a=i.extensions||{},s=[];if(a[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];n=c.getMaterialType(i),s.push(c.extendParams(o,i,this))}else if(a[e.KHR_MATERIALS_UNLIT]){var u=r[e.KHR_MATERIALS_UNLIT];n=u.getMaterialType(i),s.push(u.extendParams(o,i,this))}else{n=THREE.MeshStandardMaterial;var l=i.pbrMetallicRoughness||{};if(o.color=new THREE.Color(1,1,1),o.opacity=1,Array.isArray(l.baseColorFactor)){var h=l.baseColorFactor;o.color.fromArray(h),o.opacity=h[3]}if(void 0!==l.baseColorTexture&&s.push(this.assignTexture(o,"map",l.baseColorTexture.index)),o.metalness=void 0!==l.metallicFactor?l.metallicFactor:1,o.roughness=void 0!==l.roughnessFactor?l.roughnessFactor:1,void 0!==l.metallicRoughnessTexture){var p=l.metallicRoughnessTexture.index;s.push(this.assignTexture(o,"metalnessMap",p)),s.push(this.assignTexture(o,"roughnessMap",p))}}!0===i.doubleSided&&(o.side=THREE.DoubleSide);var d=i.alphaMode||T;return d===S?o.transparent=!0:(o.transparent=!1,d===M&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new THREE.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&n!==THREE.MeshBasicMaterial&&(s.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&n!==THREE.MeshBasicMaterial&&(o.emissive=(new THREE.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&n!==THREE.MeshBasicMaterial&&s.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(s).then(function(){var t;return t=n===THREE.ShaderMaterial?r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new n(o),void 0!==i.name&&(t.name=i.name),t.normalScale&&(t.normalScale.y=-t.normalScale.y),t.map&&(t.map.encoding=THREE.sRGBEncoding),t.emissiveMap&&(t.emissiveMap.encoding=THREE.sRGBEncoding),i.extras&&(t.userData=i.extras),t})},N.prototype.loadGeometries=function(t){var n=this,r=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then(function(o){for(var a=[],s=0,c=t.length;s<c;s++){var u=t[s],l=L(i,u);if(l)a.push(l);else if(u.extensions&&u.extensions[e.KHR_DRACO_MESH_COMPRESSION]){var h=r[e.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(u,n).then(function(t){return O(t,u,o),t});i.push({primitive:u,promise:h}),a.push(h)}else{var p=new THREE.BufferGeometry;O(p,u,o);h=Promise.resolve(p);i.push({primitive:u,promise:h}),a.push(h)}}return Promise.all(a)})},N.prototype.loadMesh=function(t){var n=this,r=(this.json,this.extensions),i=this.json.meshes[t];return this.getMultiDependencies(["accessor","material"]).then(function(o){var a=new THREE.Group,s=i.primitives;return n.loadGeometries(s).then(function(m){for(var v=0,g=s.length;v<g;v++){var y=s[v],b=m[v],_=void 0===y.material?new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide}):o.materials[y.material];_.aoMap&&void 0===b.attributes.uv2&&void 0!==b.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),b.addAttribute("uv2",new THREE.BufferAttribute(b.attributes.uv.array,2)));var x,w=void 0!==b.attributes.color,E=void 0===b.attributes.normal,T=!0===i.isSkinnedMesh,M=void 0!==y.targets;if(w||E||T||M)if(_.isGLTFSpecularGlossinessMaterial)_=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(_);else _=_.clone();if(w&&(_.vertexColors=THREE.VertexColors,_.needsUpdate=!0),E&&(_.flatShading=!0),y.mode===p||y.mode===d||y.mode===f||void 0===y.mode)T?(x=new THREE.SkinnedMesh(b,_),_.skinning=!0):x=new THREE.Mesh(b,_),y.mode===d?x.drawMode=THREE.TriangleStripDrawMode:y.mode===f&&(x.drawMode=THREE.TriangleFanDrawMode);else if(y.mode===u||y.mode===h||y.mode===l){var S="LineBasicMaterial:"+_.uuid,A=n.cache.get(S);A||(A=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(A,_),A.color.copy(_.color),A.lights=!1,n.cache.add(S,A)),_=A,x=y.mode===u?new THREE.LineSegments(b,_):y.mode===h?new THREE.Line(b,_):new THREE.LineLoop(b,_)}else{if(y.mode!==c)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);S="PointsMaterial:"+_.uuid;var C=n.cache.get(S);C||(C=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(C,_),C.color.copy(_.color),C.map=_.map,C.lights=!1,n.cache.add(S,C)),_=C,x=new THREE.Points(b,_)}if(x.name=i.name||"mesh_"+t,M&&(R(x,i,y,o.accessors),_.morphTargets=!0,void 0!==x.geometry.morphAttributes.normal&&(_.morphNormals=!0)),void 0!==i.extras&&(x.userData=i.extras),void 0!==y.extras&&(x.geometry.userData=y.extras),!0===_.isGLTFSpecularGlossinessMaterial&&(x.onBeforeRender=r[e.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(s.length>1))return x;x.name+="_"+v,a.add(x)}return a})})},N.prototype.loadCamera=function(t){var e,n=this.json.cameras[t],r=n[n.type];if(r)return"perspective"===n.type?e=new THREE.PerspectiveCamera(THREE.Math.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(e=new THREE.OrthographicCamera(r.xmag/-2,r.xmag/2,r.ymag/2,r.ymag/-2,r.znear,r.zfar)),void 0!==n.name&&(e.name=n.name),n.extras&&(e.userData=n.extras),Promise.resolve(e);console.warn("THREE.GLTFLoader: Missing camera parameters.")},N.prototype.loadSkin=function(t){var e=this.json.skins[t],n={joints:e.joints};return void 0===e.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",e.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},N.prototype.loadAnimation=function(t){this.json;var e=this.json.animations[t];return this.getMultiDependencies(["accessor","node"]).then(function(n){for(var r=[],i=0,o=e.channels.length;i<o;i++){var a=e.channels[i],c=e.samplers[a.sampler];if(c){var u=a.target,l=void 0!==u.node?u.node:u.id,h=void 0!==e.parameters?e.parameters[c.input]:c.input,p=void 0!==e.parameters?e.parameters[c.output]:c.output,d=n.accessors[h],f=n.accessors[p],m=n.nodes[l];if(m){var v;switch(m.updateMatrix(),m.matrixAutoUpdate=!0,w[u.path]){case w.weights:v=THREE.NumberKeyframeTrack;break;case w.rotation:v=THREE.QuaternionKeyframeTrack;break;case w.position:case w.scale:default:v=THREE.VectorKeyframeTrack}var g=m.name?m.name:m.uuid,y=void 0!==c.interpolation?E[c.interpolation]:THREE.InterpolateLinear,b=[];w[u.path]===w.weights?m.traverse(function(t){!0===t.isMesh&&!0===t.material.morphTargets&&b.push(t.name?t.name:t.uuid)}):b.push(g);for(var _=0,x=b.length;_<x;_++){var T=new v(b[_]+"."+w[u.path],THREE.AnimationUtils.arraySlice(d.array,0),THREE.AnimationUtils.arraySlice(f.array,0),y);"CUBICSPLINE"===c.interpolation&&(T.createInterpolant=function(t){return new s(this.times,this.values,this.getValueSize()/3,t)},T.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),r.push(T)}}}}l=void 0!==e.name?e.name:"animation_"+t;return new THREE.AnimationClip(l,void 0,r)})},N.prototype.loadNode=function(t){this.json;var n=this.extensions,r=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[t];return this.getMultiDependencies(["mesh","skin","camera","light"]).then(function(t){var a;if(!0===o.isBone)a=new THREE.Bone;else if(void 0!==o.mesh){var s=t.meshes[o.mesh];if(a=s.clone(),!0===s.isGroup)for(var c=0,u=s.children.length;c<u;c++){var l=s.children[c];l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(a.children[c].onBeforeRender=l.onBeforeRender)}else s.material&&!0===s.material.isGLTFSpecularGlossinessMaterial&&(a.onBeforeRender=s.onBeforeRender);r[o.mesh]>1&&(a.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)a=t.cameras[o.camera];else if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){a=n[e.KHR_LIGHTS].lights[o.extensions[e.KHR_LIGHTS].light]}else a=new THREE.Object3D;if(void 0!==o.name&&(a.name=THREE.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(a.userData=o.extras),void 0!==o.matrix){var h=new THREE.Matrix4;h.fromArray(o.matrix),a.applyMatrix(h)}else void 0!==o.translation&&a.position.fromArray(o.translation),void 0!==o.rotation&&a.quaternion.fromArray(o.rotation),void 0!==o.scale&&a.scale.fromArray(o.scale);return a})},N.prototype.loadScene=function(){function t(e,n,r,i,o){var a=i[e],s=r.nodes[e];if(void 0!==s.skin)for(var c=!0===a.isGroup?a.children:[a],u=0,l=c.length;u<l;u++){for(var h=c[u],p=o[s.skin],d=[],f=[],m=0,v=p.joints.length;m<v;m++){var g=p.joints[m],y=i[g];if(y){d.push(y);var b=new THREE.Matrix4;void 0!==p.inverseBindMatrices&&b.fromArray(p.inverseBindMatrices.array,16*m),f.push(b)}else console.warn(\'THREE.GLTFLoader: Joint "%s" could not be found.\',g)}h.bind(new THREE.Skeleton(d,f),h.matrixWorld)}if(n.add(a),s.children){var _=s.children;for(u=0,l=_.length;u<l;u++){t(_[u],a,r,i,o)}}}return function(n){var r=this.json,i=this.extensions,o=this.json.scenes[n];return this.getMultiDependencies(["node","skin"]).then(function(n){var a=new THREE.Scene;void 0!==o.name&&(a.name=o.name),o.extras&&(a.userData=o.extras);for(var s=o.nodes||[],c=0,u=s.length;c<u;c++)t(s[c],a,r,n.nodes,n.skins);if(o.extensions&&o.extensions[e.KHR_LIGHTS]&&void 0!==o.extensions[e.KHR_LIGHTS].light){var l=i[e.KHR_LIGHTS].lights;a.add(l[o.extensions[e.KHR_LIGHTS].light])}return a})}}(),t}()},function(t,e){\n/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function(){"use strict";var t=void 0,e=this;function n(n,r){var i,o=n.split("."),a=e;!(o[0]in a)&&a.execScript&&a.execScript("var "+o[0]);for(;o.length&&(i=o.shift());)o.length||r===t?a=a[i]?a[i]:a[i]={}:a[i]=r}var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function i(t){var e,n,i,o,a,s,c,u,l,h,p=t.length,d=0,f=Number.POSITIVE_INFINITY;for(u=0;u<p;++u)t[u]>d&&(d=t[u]),t[u]<f&&(f=t[u]);for(e=1<<d,n=new(r?Uint32Array:Array)(e),i=1,o=0,a=2;i<=d;){for(u=0;u<p;++u)if(t[u]===i){for(s=0,c=o,l=0;l<i;++l)s=s<<1|1&c,c>>=1;for(h=i<<16|u,l=s;l<e;l+=a)n[l]=h;++o}++i,o<<=1,a<<=1}return[n,d,f]}function o(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=r?new Uint8Array(t):t,this.m=!1,this.i=s,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case a:this.b=32768,this.c=new(r?Uint8Array:Array)(32768+this.h+258);break;case s:this.b=0,this.c=new(r?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var a=0,s=1,c={t:a,s:s};o.prototype.k=function(){for(;!this.m;){var e=A(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var n=this.input,o=this.a,c=this.c,u=this.b,l=n.length,h=t,d=c.length,f=t;if(this.d=this.f=0,o+1>=l)throw Error("invalid uncompressed block header: LEN");if(h=n[o++]|n[o++]<<8,o+1>=l)throw Error("invalid uncompressed block header: NLEN");if(h===~(n[o++]|n[o++]<<8))throw Error("invalid uncompressed block header: length verify");if(o+h>n.length)throw Error("input buffer is broken");switch(this.i){case a:for(;u+h>c.length;){if(h-=f=d-u,r)c.set(n.subarray(o,o+f),u),u+=f,o+=f;else for(;f--;)c[u++]=n[o++];this.b=u,c=this.e(),u=this.b}break;case s:for(;u+h>c.length;)c=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(r)c.set(n.subarray(o,o+h),u),u+=h,o+=h;else for(;h--;)c[u++]=n[o++];this.a=o,this.b=u,this.c=c;break;case 1:this.j(T,S);break;case 2:var m,v,g,y,b=A(this,5)+257,_=A(this,5)+1,x=A(this,4)+4,w=new(r?Uint8Array:Array)(p.length),E=t,M=t,C=t,L=t,P=t;for(P=0;P<x;++P)w[p[P]]=A(this,3);if(!r)for(P=x,x=w.length;P<x;++P)w[p[P]]=0;for(m=i(w),E=new(r?Uint8Array:Array)(b+_),P=0,y=b+_;P<y;)switch(M=R(this,m),M){case 16:for(L=3+A(this,2);L--;)E[P++]=C;break;case 17:for(L=3+A(this,3);L--;)E[P++]=0;C=0;break;case 18:for(L=11+A(this,7);L--;)E[P++]=0;C=0;break;default:C=E[P++]=M}v=i(r?E.subarray(0,b):E.slice(0,b)),g=i(r?E.subarray(b):E.slice(b)),this.j(v,g);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var u,l,h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=r?new Uint16Array(h):h,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],f=r?new Uint16Array(d):d,m=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=r?new Uint8Array(m):m,g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],y=r?new Uint16Array(g):g,b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=r?new Uint8Array(b):b,x=new(r?Uint8Array:Array)(288);for(u=0,l=x.length;u<l;++u)x[u]=143>=u?8:255>=u?9:279>=u?7:8;var w,E,T=i(x),M=new(r?Uint8Array:Array)(30);for(w=0,E=M.length;w<E;++w)M[w]=5;var S=i(M);function A(t,e){for(var n,r=t.f,i=t.d,o=t.input,a=t.a,s=o.length;i<e;){if(a>=s)throw Error("input buffer is broken");r|=o[a++]<<i,i+=8}return n=r&(1<<e)-1,t.f=r>>>e,t.d=i-e,t.a=a,n}function R(t,e){for(var n,r,i=t.f,o=t.d,a=t.input,s=t.a,c=a.length,u=e[0],l=e[1];o<l&&!(s>=c);)i|=a[s++]<<o,o+=8;if((r=(n=u[i&(1<<l)-1])>>>16)>o)throw Error("invalid code length: "+r);return t.f=i>>r,t.d=o-r,t.a=s,65535&n}function C(t,e){var n,r;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),n=t[this.a++],r=t[this.a++],15&n){case L:this.method=L;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new o(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}o.prototype.j=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length-258;256!==(i=R(this,t));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r>=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.w=function(t,e){var n=this.c,r=this.b;this.o=t;for(var i,o,a,s,c=n.length;256!==(i=R(this,t));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=f[o=i-257],0<v[o]&&(s+=A(this,v[o])),i=R(this,e),a=y[i],0<_[i]&&(a+=A(this,_[i])),r+s>c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-a];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},o.prototype.e=function(){var t,e,n=new(r?Uint8Array:Array)(this.b-32768),i=this.b-32768,o=this.c;if(r)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.g.push(n),this.l+=n.length,r)o.set(o.subarray(i,i+32768));else for(t=0;32768>t;++t)o[t]=o[i+t];return this.b=32768,o},o.prototype.z=function(t){var e,n,i,o=this.input.length/this.a+1|0,a=this.input,s=this.c;return t&&("number"==typeof t.p&&(o=t.p),"number"==typeof t.u&&(o+=t.u)),2>o?n=(i=(a.length-this.a)/this.o[2]/2*258|0)<s.length?s.length+i:s.length<<1:n=s.length*o,r?(e=new Uint8Array(n)).set(s):e=s,this.c=e},o.prototype.n=function(){var t,e,n,i,o,a=0,s=this.c,c=this.g,u=new(r?Uint8Array:Array)(this.l+(this.b-32768));if(0===c.length)return r?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,n=c.length;e<n;++e)for(i=0,o=(t=c[e]).length;i<o;++i)u[a++]=t[i];for(e=32768,n=this.b;e<n;++e)u[a++]=s[e];return this.g=[],this.buffer=u},o.prototype.v=function(){var t,e=this.b;return r?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},C.prototype.k=function(){var t,e,n=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=t;if("string"==typeof r){var i,o,a=r.split("");for(i=0,o=a.length;i<o;i++)a[i]=(255&a[i].charCodeAt(0))>>>0;r=a}for(var s,c=1,u=0,l=r.length,h=0;0<l;){l-=s=1024<l?1024:l;do{u+=c+=r[h++]}while(--s);c%=65521,u%=65521}if(e!==(u<<16|c)>>>0)throw Error("invalid adler-32 checksum")}return t};var L=8;n("Zlib.Inflate",C),n("Zlib.Inflate.prototype.decompress",C.prototype.k);var P,N,O,I,D={ADAPTIVE:c.s,BLOCK:c.t};if(Object.keys)P=Object.keys(D);else for(N in P=[],O=0,D)P[O++]=N;for(O=0,I=P.length;O<I;++O)n("Zlib.Inflate.BufferType."+(N=P[O]),D[N])}).call(this)},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return sn}),n.d(e,"WebGLRenderTarget",function(){return an}),n.d(e,"WebGLRenderer",function(){return Hi}),n.d(e,"ShaderLib",function(){return _n}),n.d(e,"UniformsLib",function(){return bn}),n.d(e,"UniformsUtils",function(){return mn}),n.d(e,"ShaderChunk",function(){return fn}),n.d(e,"FogExp2",function(){return Bi}),n.d(e,"Fog",function(){return zi}),n.d(e,"Scene",function(){return ki}),n.d(e,"Sprite",function(){return ji}),n.d(e,"LOD",function(){return Vi}),n.d(e,"SkinnedMesh",function(){return qi}),n.d(e,"Skeleton",function(){return Wi}),n.d(e,"Bone",function(){return Xi}),n.d(e,"Mesh",function(){return mr}),n.d(e,"LineSegments",function(){return Ji}),n.d(e,"LineLoop",function(){return Ki}),n.d(e,"Line",function(){return Zi}),n.d(e,"Points",function(){return $i}),n.d(e,"Group",function(){return to}),n.d(e,"VideoTexture",function(){return eo}),n.d(e,"DataTexture",function(){return cn}),n.d(e,"CompressedTexture",function(){return no}),n.d(e,"CubeTexture",function(){return gr}),n.d(e,"CanvasTexture",function(){return Pi}),n.d(e,"DepthTexture",function(){return ro}),n.d(e,"Texture",function(){return rn}),n.d(e,"CompressedTextureLoader",function(){return Na}),n.d(e,"DataTextureLoader",function(){return Oa}),n.d(e,"CubeTextureLoader",function(){return Da}),n.d(e,"TextureLoader",function(){return Fa}),n.d(e,"ObjectLoader",function(){return zs}),n.d(e,"MaterialLoader",function(){return Ls}),n.d(e,"BufferGeometryLoader",function(){return Ps}),n.d(e,"DefaultLoadingManager",function(){return Ca}),n.d(e,"LoadingManager",function(){return Ra}),n.d(e,"JSONLoader",function(){return Bs}),n.d(e,"ImageLoader",function(){return Ia}),n.d(e,"ImageBitmapLoader",function(){return Ws}),n.d(e,"FontLoader",function(){return Zs}),n.d(e,"FileLoader",function(){return Pa}),n.d(e,"Loader",function(){return Us}),n.d(e,"LoaderUtils",function(){return Hs}),n.d(e,"Cache",function(){return Aa}),n.d(e,"AudioLoader",function(){return sc}),n.d(e,"SpotLightShadow",function(){return us}),n.d(e,"SpotLight",function(){return ls}),n.d(e,"PointLight",function(){return hs}),n.d(e,"RectAreaLight",function(){return ms}),n.d(e,"HemisphereLight",function(){return ss}),n.d(e,"DirectionalLightShadow",function(){return ps}),n.d(e,"DirectionalLight",function(){return ds}),n.d(e,"AmbientLight",function(){return fs}),n.d(e,"LightShadow",function(){return cs}),n.d(e,"Light",function(){return as}),n.d(e,"StereoCamera",function(){return cc}),n.d(e,"PerspectiveCamera",function(){return Di}),n.d(e,"OrthographicCamera",function(){return Pn}),n.d(e,"CubeCamera",function(){return uc}),n.d(e,"ArrayCamera",function(){return Fi}),n.d(e,"Camera",function(){return Ln}),n.d(e,"AudioListener",function(){return lc}),n.d(e,"PositionalAudio",function(){return pc}),n.d(e,"AudioContext",function(){return ac}),n.d(e,"AudioAnalyser",function(){return dc}),n.d(e,"Audio",function(){return hc}),n.d(e,"VectorKeyframeTrack",function(){return Rs}),n.d(e,"StringKeyframeTrack",function(){return vs}),n.d(e,"QuaternionKeyframeTrack",function(){return _s}),n.d(e,"NumberKeyframeTrack",function(){return ws}),n.d(e,"ColorKeyframeTrack",function(){return xs}),n.d(e,"BooleanKeyframeTrack",function(){return gs}),n.d(e,"PropertyMixer",function(){return fc}),n.d(e,"PropertyBinding",function(){return Cc}),n.d(e,"KeyframeTrack",function(){return As}),n.d(e,"AnimationUtils",function(){return Ss}),n.d(e,"AnimationObjectGroup",function(){return Lc}),n.d(e,"AnimationMixer",function(){return Nc}),n.d(e,"AnimationClip",function(){return Cs}),n.d(e,"Uniform",function(){return Oc}),n.d(e,"InstancedBufferGeometry",function(){return Ic}),n.d(e,"BufferGeometry",function(){return Jn}),n.d(e,"Geometry",function(){return Fn}),n.d(e,"InterleavedBufferAttribute",function(){return Dc}),n.d(e,"InstancedInterleavedBuffer",function(){return Uc}),n.d(e,"InterleavedBuffer",function(){return Fc}),n.d(e,"InstancedBufferAttribute",function(){return Hc}),n.d(e,"Face3",function(){return Nn}),n.d(e,"Object3D",function(){return Cn}),n.d(e,"Raycaster",function(){return Bc}),n.d(e,"Layers",function(){return En}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gc}),n.d(e,"QuaternionLinearInterpolant",function(){return bs}),n.d(e,"LinearInterpolant",function(){return Ts}),n.d(e,"DiscreteInterpolant",function(){return Ms}),n.d(e,"CubicInterpolant",function(){return Es}),n.d(e,"Interpolant",function(){return ys}),n.d(e,"Triangle",function(){return fr}),n.d(e,"Math",function(){return Ve}),n.d(e,"Spherical",function(){return jc}),n.d(e,"Cylindrical",function(){return Vc}),n.d(e,"Plane",function(){return hn}),n.d(e,"Frustum",function(){return pn}),n.d(e,"Sphere",function(){return ln}),n.d(e,"Ray",function(){return pr}),n.d(e,"Matrix4",function(){return Xe}),n.d(e,"Matrix3",function(){return Ze}),n.d(e,"Box3",function(){return un}),n.d(e,"Box2",function(){return Wc}),n.d(e,"Line3",function(){return dr}),n.d(e,"Euler",function(){return wn}),n.d(e,"Vector4",function(){return on}),n.d(e,"Vector3",function(){return Ye}),n.d(e,"Vector2",function(){return We}),n.d(e,"Quaternion",function(){return qe}),n.d(e,"Color",function(){return gn}),n.d(e,"ImmediateRenderObject",function(){return Xc}),n.d(e,"VertexNormalsHelper",function(){return qc}),n.d(e,"SpotLightHelper",function(){return Yc}),n.d(e,"SkeletonHelper",function(){return Zc}),n.d(e,"PointLightHelper",function(){return Jc}),n.d(e,"RectAreaLightHelper",function(){return Kc}),n.d(e,"HemisphereLightHelper",function(){return Qc}),n.d(e,"GridHelper",function(){return $c}),n.d(e,"PolarGridHelper",function(){return tu}),n.d(e,"FaceNormalsHelper",function(){return eu}),n.d(e,"DirectionalLightHelper",function(){return nu}),n.d(e,"CameraHelper",function(){return ru}),n.d(e,"BoxHelper",function(){return iu}),n.d(e,"Box3Helper",function(){return ou}),n.d(e,"PlaneHelper",function(){return au}),n.d(e,"ArrowHelper",function(){return su}),n.d(e,"AxesHelper",function(){return cu}),n.d(e,"Shape",function(){return os}),n.d(e,"Path",function(){return is}),n.d(e,"ShapePath",function(){return Xs}),n.d(e,"Font",function(){return qs}),n.d(e,"CurvePath",function(){return rs}),n.d(e,"Curve",function(){return Ua}),n.d(e,"ShapeUtils",function(){return Xo}),n.d(e,"WebGLUtils",function(){return Ii}),n.d(e,"WireframeGeometry",function(){return io}),n.d(e,"ParametricGeometry",function(){return oo}),n.d(e,"ParametricBufferGeometry",function(){return ao}),n.d(e,"TetrahedronGeometry",function(){return uo}),n.d(e,"TetrahedronBufferGeometry",function(){return lo}),n.d(e,"OctahedronGeometry",function(){return ho}),n.d(e,"OctahedronBufferGeometry",function(){return po}),n.d(e,"IcosahedronGeometry",function(){return fo}),n.d(e,"IcosahedronBufferGeometry",function(){return mo}),n.d(e,"DodecahedronGeometry",function(){return vo}),n.d(e,"DodecahedronBufferGeometry",function(){return go}),n.d(e,"PolyhedronGeometry",function(){return so}),n.d(e,"PolyhedronBufferGeometry",function(){return co}),n.d(e,"TubeGeometry",function(){return yo}),n.d(e,"TubeBufferGeometry",function(){return bo}),n.d(e,"TorusKnotGeometry",function(){return _o}),n.d(e,"TorusKnotBufferGeometry",function(){return xo}),n.d(e,"TorusGeometry",function(){return wo}),n.d(e,"TorusBufferGeometry",function(){return Eo}),n.d(e,"TextGeometry",function(){return Qo}),n.d(e,"TextBufferGeometry",function(){return $o}),n.d(e,"SphereGeometry",function(){return ta}),n.d(e,"SphereBufferGeometry",function(){return ea}),n.d(e,"RingGeometry",function(){return na}),n.d(e,"RingBufferGeometry",function(){return ra}),n.d(e,"PlaneGeometry",function(){return $n}),n.d(e,"PlaneBufferGeometry",function(){return tr}),n.d(e,"LatheGeometry",function(){return ia}),n.d(e,"LatheBufferGeometry",function(){return oa}),n.d(e,"ShapeGeometry",function(){return aa}),n.d(e,"ShapeBufferGeometry",function(){return sa}),n.d(e,"ExtrudeGeometry",function(){return Zo}),n.d(e,"ExtrudeBufferGeometry",function(){return Jo}),n.d(e,"EdgesGeometry",function(){return ua}),n.d(e,"ConeGeometry",function(){return pa}),n.d(e,"ConeBufferGeometry",function(){return da}),n.d(e,"CylinderGeometry",function(){return la}),n.d(e,"CylinderBufferGeometry",function(){return ha}),n.d(e,"CircleGeometry",function(){return fa}),n.d(e,"CircleBufferGeometry",function(){return ma}),n.d(e,"BoxGeometry",function(){return Kn}),n.d(e,"BoxBufferGeometry",function(){return Qn}),n.d(e,"ShadowMaterial",function(){return ga}),n.d(e,"SpriteMaterial",function(){return Gi}),n.d(e,"RawShaderMaterial",function(){return ya}),n.d(e,"ShaderMaterial",function(){return hr}),n.d(e,"PointsMaterial",function(){return Qi}),n.d(e,"MeshPhysicalMaterial",function(){return _a}),n.d(e,"MeshStandardMaterial",function(){return ba}),n.d(e,"MeshPhongMaterial",function(){return xa}),n.d(e,"MeshToonMaterial",function(){return wa}),n.d(e,"MeshNormalMaterial",function(){return Ea}),n.d(e,"MeshLambertMaterial",function(){return Ta}),n.d(e,"MeshDepthMaterial",function(){return Ri}),n.d(e,"MeshDistanceMaterial",function(){return Ci}),n.d(e,"MeshBasicMaterial",function(){return lr}),n.d(e,"LineDashedMaterial",function(){return Ma}),n.d(e,"LineBasicMaterial",function(){return Yi}),n.d(e,"Material",function(){return ur}),n.d(e,"Float64BufferAttribute",function(){return Xn}),n.d(e,"Float32BufferAttribute",function(){return Wn}),n.d(e,"Uint32BufferAttribute",function(){return Vn}),n.d(e,"Int32BufferAttribute",function(){return jn}),n.d(e,"Uint16BufferAttribute",function(){return Gn}),n.d(e,"Int16BufferAttribute",function(){return kn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return zn}),n.d(e,"Uint8BufferAttribute",function(){return Bn}),n.d(e,"Int8BufferAttribute",function(){return Hn}),n.d(e,"BufferAttribute",function(){return Un}),n.d(e,"ArcCurve",function(){return Ba}),n.d(e,"CatmullRomCurve3",function(){return Wa}),n.d(e,"CubicBezierCurve",function(){return Za}),n.d(e,"CubicBezierCurve3",function(){return Ja}),n.d(e,"EllipseCurve",function(){return Ha}),n.d(e,"LineCurve",function(){return Ka}),n.d(e,"LineCurve3",function(){return Qa}),n.d(e,"QuadraticBezierCurve",function(){return $a}),n.d(e,"QuadraticBezierCurve3",function(){return ts}),n.d(e,"SplineCurve",function(){return es}),n.d(e,"REVISION",function(){return d}),n.d(e,"MOUSE",function(){return f}),n.d(e,"CullFaceNone",function(){return m}),n.d(e,"CullFaceBack",function(){return v}),n.d(e,"CullFaceFront",function(){return g}),n.d(e,"CullFaceFrontBack",function(){return y}),n.d(e,"FrontFaceDirectionCW",function(){return b}),n.d(e,"FrontFaceDirectionCCW",function(){return _}),n.d(e,"BasicShadowMap",function(){return x}),n.d(e,"PCFShadowMap",function(){return w}),n.d(e,"PCFSoftShadowMap",function(){return E}),n.d(e,"FrontSide",function(){return T}),n.d(e,"BackSide",function(){return M}),n.d(e,"DoubleSide",function(){return S}),n.d(e,"FlatShading",function(){return A}),n.d(e,"SmoothShading",function(){return R}),n.d(e,"NoColors",function(){return C}),n.d(e,"FaceColors",function(){return L}),n.d(e,"VertexColors",function(){return P}),n.d(e,"NoBlending",function(){return N}),n.d(e,"NormalBlending",function(){return O}),n.d(e,"AdditiveBlending",function(){return I}),n.d(e,"SubtractiveBlending",function(){return D}),n.d(e,"MultiplyBlending",function(){return F}),n.d(e,"CustomBlending",function(){return U}),n.d(e,"AddEquation",function(){return H}),n.d(e,"SubtractEquation",function(){return B}),n.d(e,"ReverseSubtractEquation",function(){return z}),n.d(e,"MinEquation",function(){return k}),n.d(e,"MaxEquation",function(){return G}),n.d(e,"ZeroFactor",function(){return j}),n.d(e,"OneFactor",function(){return V}),n.d(e,"SrcColorFactor",function(){return W}),n.d(e,"OneMinusSrcColorFactor",function(){return X}),n.d(e,"SrcAlphaFactor",function(){return q}),n.d(e,"OneMinusSrcAlphaFactor",function(){return Y}),n.d(e,"DstAlphaFactor",function(){return Z}),n.d(e,"OneMinusDstAlphaFactor",function(){return J}),n.d(e,"DstColorFactor",function(){return K}),n.d(e,"OneMinusDstColorFactor",function(){return Q}),n.d(e,"SrcAlphaSaturateFactor",function(){return $}),n.d(e,"NeverDepth",function(){return tt}),n.d(e,"AlwaysDepth",function(){return et}),n.d(e,"LessDepth",function(){return nt}),n.d(e,"LessEqualDepth",function(){return rt}),n.d(e,"EqualDepth",function(){return it}),n.d(e,"GreaterEqualDepth",function(){return ot}),n.d(e,"GreaterDepth",function(){return at}),n.d(e,"NotEqualDepth",function(){return st}),n.d(e,"MultiplyOperation",function(){return ct}),n.d(e,"MixOperation",function(){return ut}),n.d(e,"AddOperation",function(){return lt}),n.d(e,"NoToneMapping",function(){return ht}),n.d(e,"LinearToneMapping",function(){return pt}),n.d(e,"ReinhardToneMapping",function(){return dt}),n.d(e,"Uncharted2ToneMapping",function(){return ft}),n.d(e,"CineonToneMapping",function(){return mt}),n.d(e,"UVMapping",function(){return vt}),n.d(e,"CubeReflectionMapping",function(){return gt}),n.d(e,"CubeRefractionMapping",function(){return yt}),n.d(e,"EquirectangularReflectionMapping",function(){return bt}),n.d(e,"EquirectangularRefractionMapping",function(){return _t}),n.d(e,"SphericalReflectionMapping",function(){return xt}),n.d(e,"CubeUVReflectionMapping",function(){return wt}),n.d(e,"CubeUVRefractionMapping",function(){return Et}),n.d(e,"RepeatWrapping",function(){return Tt}),n.d(e,"ClampToEdgeWrapping",function(){return Mt}),n.d(e,"MirroredRepeatWrapping",function(){return St}),n.d(e,"NearestFilter",function(){return At}),n.d(e,"NearestMipMapNearestFilter",function(){return Rt}),n.d(e,"NearestMipMapLinearFilter",function(){return Ct}),n.d(e,"LinearFilter",function(){return Lt}),n.d(e,"LinearMipMapNearestFilter",function(){return Pt}),n.d(e,"LinearMipMapLinearFilter",function(){return Nt}),n.d(e,"UnsignedByteType",function(){return Ot}),n.d(e,"ByteType",function(){return It}),n.d(e,"ShortType",function(){return Dt}),n.d(e,"UnsignedShortType",function(){return Ft}),n.d(e,"IntType",function(){return Ut}),n.d(e,"UnsignedIntType",function(){return Ht}),n.d(e,"FloatType",function(){return Bt}),n.d(e,"HalfFloatType",function(){return zt}),n.d(e,"UnsignedShort4444Type",function(){return kt}),n.d(e,"UnsignedShort5551Type",function(){return Gt}),n.d(e,"UnsignedShort565Type",function(){return jt}),n.d(e,"UnsignedInt248Type",function(){return Vt}),n.d(e,"AlphaFormat",function(){return Wt}),n.d(e,"RGBFormat",function(){return Xt}),n.d(e,"RGBAFormat",function(){return qt}),n.d(e,"LuminanceFormat",function(){return Yt}),n.d(e,"LuminanceAlphaFormat",function(){return Zt}),n.d(e,"RGBEFormat",function(){return Jt}),n.d(e,"DepthFormat",function(){return Kt}),n.d(e,"DepthStencilFormat",function(){return Qt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return $t}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return te}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return ee}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return ne}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return re}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return ie}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return oe}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return ae}),n.d(e,"RGB_ETC1_Format",function(){return se}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return ce}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return ue}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return le}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return he}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return pe}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return de}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return fe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return me}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return ve}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ge}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ye}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return be}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return _e}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return xe}),n.d(e,"LoopOnce",function(){return we}),n.d(e,"LoopRepeat",function(){return Ee}),n.d(e,"LoopPingPong",function(){return Te}),n.d(e,"InterpolateDiscrete",function(){return Me}),n.d(e,"InterpolateLinear",function(){return Se}),n.d(e,"InterpolateSmooth",function(){return Ae}),n.d(e,"ZeroCurvatureEnding",function(){return Re}),n.d(e,"ZeroSlopeEnding",function(){return Ce}),n.d(e,"WrapAroundEnding",function(){return Le}),n.d(e,"TrianglesDrawMode",function(){return Pe}),n.d(e,"TriangleStripDrawMode",function(){return Ne}),n.d(e,"TriangleFanDrawMode",function(){return Oe}),n.d(e,"LinearEncoding",function(){return Ie}),n.d(e,"sRGBEncoding",function(){return De}),n.d(e,"GammaEncoding",function(){return Fe}),n.d(e,"RGBEEncoding",function(){return Ue}),n.d(e,"LogLuvEncoding",function(){return He}),n.d(e,"RGBM7Encoding",function(){return Be}),n.d(e,"RGBM16Encoding",function(){return ze}),n.d(e,"RGBDEncoding",function(){return ke}),n.d(e,"BasicDepthPacking",function(){return Ge}),n.d(e,"RGBADepthPacking",function(){return je}),n.d(e,"CubeGeometry",function(){return Kn}),n.d(e,"Face4",function(){return uu}),n.d(e,"LineStrip",function(){return lu}),n.d(e,"LinePieces",function(){return hu}),n.d(e,"MeshFaceMaterial",function(){return pu}),n.d(e,"MultiMaterial",function(){return du}),n.d(e,"PointCloud",function(){return fu}),n.d(e,"Particle",function(){return mu}),n.d(e,"ParticleSystem",function(){return vu}),n.d(e,"PointCloudMaterial",function(){return gu}),n.d(e,"ParticleBasicMaterial",function(){return yu}),n.d(e,"ParticleSystemMaterial",function(){return bu}),n.d(e,"Vertex",function(){return _u}),n.d(e,"DynamicBufferAttribute",function(){return xu}),n.d(e,"Int8Attribute",function(){return wu}),n.d(e,"Uint8Attribute",function(){return Eu}),n.d(e,"Uint8ClampedAttribute",function(){return Tu}),n.d(e,"Int16Attribute",function(){return Mu}),n.d(e,"Uint16Attribute",function(){return Su}),n.d(e,"Int32Attribute",function(){return Au}),n.d(e,"Uint32Attribute",function(){return Ru}),n.d(e,"Float32Attribute",function(){return Cu}),n.d(e,"Float64Attribute",function(){return Lu}),n.d(e,"ClosedSplineCurve3",function(){return Pu}),n.d(e,"SplineCurve3",function(){return Nu}),n.d(e,"Spline",function(){return Ou}),n.d(e,"AxisHelper",function(){return Iu}),n.d(e,"BoundingBoxHelper",function(){return Du}),n.d(e,"EdgesHelper",function(){return Fu}),n.d(e,"WireframeHelper",function(){return Uu}),n.d(e,"XHRLoader",function(){return Hu}),n.d(e,"BinaryTextureLoader",function(){return Bu}),n.d(e,"GeometryUtils",function(){return zu}),n.d(e,"ImageUtils",function(){return ku}),n.d(e,"Projector",function(){return Gu}),n.d(e,"CanvasRenderer",function(){return ju}),n.d(e,"SceneUtils",function(){return Vu}),n.d(e,"LensFlare",function(){return Wu}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i,o,a,s,c,u,l,h,p,d="92",f={LEFT:0,MIDDLE:1,RIGHT:2},m=0,v=1,g=2,y=3,b=0,_=1,x=0,w=1,E=2,T=0,M=1,S=2,A=1,R=2,C=0,L=1,P=2,N=0,O=1,I=2,D=3,F=4,U=5,H=100,B=101,z=102,k=103,G=104,j=200,V=201,W=202,X=203,q=204,Y=205,Z=206,J=207,K=208,Q=209,$=210,tt=0,et=1,nt=2,rt=3,it=4,ot=5,at=6,st=7,ct=0,ut=1,lt=2,ht=0,pt=1,dt=2,ft=3,mt=4,vt=300,gt=301,yt=302,bt=303,_t=304,xt=305,wt=306,Et=307,Tt=1e3,Mt=1001,St=1002,At=1003,Rt=1004,Ct=1005,Lt=1006,Pt=1007,Nt=1008,Ot=1009,It=1010,Dt=1011,Ft=1012,Ut=1013,Ht=1014,Bt=1015,zt=1016,kt=1017,Gt=1018,jt=1019,Vt=1020,Wt=1021,Xt=1022,qt=1023,Yt=1024,Zt=1025,Jt=qt,Kt=1026,Qt=1027,$t=33776,te=33777,ee=33778,ne=33779,re=35840,ie=35841,oe=35842,ae=35843,se=36196,ce=37808,ue=37809,le=37810,he=37811,pe=37812,de=37813,fe=37814,me=37815,ve=37816,ge=37817,ye=37818,be=37819,_e=37820,xe=37821,we=2200,Ee=2201,Te=2202,Me=2300,Se=2301,Ae=2302,Re=2400,Ce=2401,Le=2402,Pe=0,Ne=1,Oe=2,Ie=3e3,De=3001,Fe=3007,Ue=3002,He=3003,Be=3004,ze=3005,ke=3006,Ge=3200,je=3201,Ve={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},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(t){return t*Ve.DEG2RAD},radToDeg:function(t){return t*Ve.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function We(t,e){this.x=t||0,this.y=e||0}function Xe(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function qe(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ye(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function Ze(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(We.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(We.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},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)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,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 this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(i=new We,o=new We,function(t,e){return i.set(t,t),o.set(e,e),this.clamp(i,o)}),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(Xe.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,l,h,p,d,f,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=l,v[14]=h,v[3]=p,v[7]=d,v[11]=f,v[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},clone:function(){return(new Xe).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:(h=new Ye,function(t){var e=this.elements,n=t.elements,r=1/h.setFromMatrixColumn(t,0).length(),i=1/h.setFromMatrixColumn(t,1).length(),o=1/h.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=h-f*c,e[9]=-a*s,e[2]=f-h*c,e[6]=d+p*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*l,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*l,g=c*u,y=c*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){h=o*u,p=o*l,d=a*u,f=a*l;e[0]=s*u,e[4]=d*c-p,e[8]=h*c+f,e[1]=s*l,e[5]=f*c+h,e[9]=p*c-d,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){b=o*s,_=o*c,x=a*s,w=a*c;e[0]=s*u,e[4]=-l,e[8]=c*u,e[1]=b*l+w,e[5]=o*u,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*u,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,c=i+i,u=n*a,l=n*s,h=n*c,p=r*s,d=r*c,f=i*c,m=o*a,v=o*s,g=o*c;return e[0]=1-(p+f),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(u+f),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(u+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:(c=new Ye,u=new Ye,l=new Ye,function(t,e,n){var r=this.elements;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),c.crossVectors(n,l),0===c.lengthSq()&&(1===Math.abs(n.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),c.crossVectors(n,l)),c.normalize(),u.crossVectors(l,c),r[0]=c.x,r[4]=u.x,r[8]=l.x,r[1]=c.y,r[5]=u.y,r[9]=l.y,r[2]=c.z,r[6]=u.z,r[10]=l.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)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],l=n[5],h=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],E=r[8],T=r[12],M=r[1],S=r[5],A=r[9],R=r[13],C=r[2],L=r[6],P=r[10],N=r[14],O=r[3],I=r[7],D=r[11],F=r[15];return i[0]=o*x+a*M+s*C+c*O,i[4]=o*w+a*S+s*L+c*I,i[8]=o*E+a*A+s*P+c*D,i[12]=o*T+a*R+s*N+c*F,i[1]=u*x+l*M+h*C+p*O,i[5]=u*w+l*S+h*L+p*I,i[9]=u*E+l*A+h*P+p*D,i[13]=u*T+l*R+h*N+p*F,i[2]=d*x+f*M+m*C+v*O,i[6]=d*w+f*S+m*L+v*I,i[10]=d*E+f*A+m*P+v*D,i[14]=d*T+f*R+m*N+v*F,i[3]=g*x+y*M+b*C+_*O,i[7]=g*w+y*S+b*L+_*I,i[11]=g*E+y*A+b*P+_*D,i[15]=g*T+y*R+b*N+_*F,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},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],l=t[6],h=t[10],p=t[14];return t[3]*(+i*s*l-r*c*l-i*a*h+n*c*h+r*a*p-n*s*p)+t[7]*(+e*s*p-e*c*h+i*o*h-r*o*p+r*c*u-i*s*u)+t[11]*(+e*c*l-e*a*p-i*o*l+n*o*p+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*l+e*a*h+r*o*l-n*o*h+n*s*u)},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},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 n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],l=r[6],h=r[7],p=r[8],d=r[9],f=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*f*h+g*l*m-u*y*m-d*l*b+u*f*b,x=v*f*h-p*y*h-v*l*m+c*y*m+p*l*b-c*f*b,w=p*g*h-v*d*h+v*u*m-c*g*m-p*u*b+c*d*b,E=v*d*l-p*g*l-v*u*f+c*g*f+p*u*y-c*d*y,T=i*_+o*x+a*w+s*E;if(0===T){var M="THREE.Matrix4: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(M);return console.warn(M),this.identity()}var S=1/T;return n[0]=_*S,n[1]=(g*f*s-d*y*s-g*a*m+o*y*m+d*a*b-o*f*b)*S,n[2]=(u*y*s-g*l*s+g*a*h-o*y*h-u*a*b+o*l*b)*S,n[3]=(d*l*s-u*f*s-d*a*h+o*f*h+u*a*m-o*l*m)*S,n[4]=x*S,n[5]=(p*y*s-v*f*s+v*a*m-i*y*m-p*a*b+i*f*b)*S,n[6]=(v*l*s-c*y*s-v*a*h+i*y*h+c*a*b-i*l*b)*S,n[7]=(c*f*s-p*l*s+p*a*h-i*f*h-c*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-p*g*s-v*o*m+i*g*m+p*o*b-i*d*b)*S,n[10]=(c*g*s-v*u*s+v*o*h-i*g*h-c*o*b+i*u*b)*S,n[11]=(p*u*s-c*d*s-p*o*h+i*d*h+c*o*m-i*u*m)*S,n[12]=E*S,n[13]=(p*g*a-v*d*a+v*o*f-i*g*f-p*o*y+i*d*y)*S,n[14]=(v*u*a-c*g*a-v*o*l+i*g*l+c*o*y-i*u*y)*S,n[15]=(c*d*a-p*u*a+p*o*l-i*d*l-c*o*f+i*u*f)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:(a=new Ye,s=new Xe,function(t,e,n){var r=this.elements,i=a.set(r[0],r[1],r[2]).length(),o=a.set(r[4],r[5],r[6]).length(),c=a.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],s.copy(this);var u=1/i,l=1/o,h=1/c;return s.elements[0]*=u,s.elements[1]*=u,s.elements[2]*=u,s.elements[4]*=l,s.elements[5]*=l,s.elements[6]*=l,s.elements[8]*=h,s.elements[9]*=h,s.elements[10]*=h,e.setFromRotationMatrix(s),n.x=i,n.y=o,n.z=c,this}),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),p=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),l=(e+t)*s,h=(n+r)*c,p=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(qe,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],l=n[r+3],h=i[o+0],p=i[o+1],d=i[o+2],f=i[o+3];if(l!==f||s!==h||c!==p||u!==d){var m=1-a,v=s*h+c*p+u*d+l*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,c=c*m+p*x,u=u*m+d*x,l=l*m+f*x,m===1-a){var w=1/Math.sqrt(s*s+c*c+u*u+l*l);s*=w,c*=w,u*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=l}}),Object.defineProperties(qe.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(qe.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},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(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),l=a(i/2),h=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"YXZ"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"ZXY"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l-h*p*d):"ZYX"===o?(this._x=h*u*l-c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l+h*p*d):"YZX"===o?(this._x=h*u*l+c*p*d,this._y=c*p*l+h*u*d,this._z=c*u*d-h*p*l,this._w=c*u*l-h*p*d):"XZY"===o&&(this._x=h*u*l-c*p*d,this._y=c*p*l-h*u*d,this._z=c*u*d+h*p*l,this._w=c*u*l+h*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],l=n[6],h=n[10],p=r+s+h;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ye;return function(n,r){return void 0===e&&(e=new Ye),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},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._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=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)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var c=Math.atan2(s,a),u=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=o*u+this._w*l,this._x=n*u+this._x*l,this._y=r*u+this._y*l,this._z=i*u+this._z*l,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(){}}),Object.assign(Ye.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,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 new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,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:(p=new qe,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(p.setFromEuler(t))}),applyAxisAngle:function(){var t=new qe;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=c*s+h*-i+u*-a-l*-o,this.y=u*s+h*-o+l*-i-c*-a,this.z=l*s+h*-a+c*-o-u*-i,this},project:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new Xe;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ye,e=new Ye;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?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)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ye;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ye;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ve.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(Ze.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ye;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],l=n[7],h=n[2],p=n[5],d=n[8],f=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*f+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=c*f+u*g+l*_,i[4]=c*m+u*y+l*x,i[7]=c*v+u*b+l*w,i[2]=h*f+p*g+d*_,i[5]=h*m+p*y+d*x,i[8]=h*v+p*b+d*w,this},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],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],l=n[6],h=n[7],p=n[8],d=p*c-u*h,f=u*l-p*s,m=h*s-c*l,v=i*d+o*f+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can\'t invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-p*o)*y,r[2]=(u*o-a*c)*y,r[3]=f*y,r[4]=(p*i-a*l)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(c*i-o*s)*y,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},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},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},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var Je,Ke,Qe,$e,tn,en,nn=0;function rn(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:nn++}),this.uuid=Ve.generateUUID(),this.name="",this.image=void 0!==t?t:rn.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:rn.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:Mt,this.wrapT=void 0!==r?r:Mt,this.magFilter=void 0!==i?i:Lt,this.minFilter=void 0!==o?o:Nt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:qt,this.type=void 0!==s?s:Ot,this.offset=new We(0,0),this.repeat=new We(1,1),this.center=new We(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Ie,this.version=0,this.onUpdate=null}function on(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function an(t,e,n){this.width=t,this.height=e,this.scissor=new on(0,0,t,e),this.scissorTest=!1,this.viewport=new on(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=Lt),this.texture=new rn(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function sn(t,e,n){an.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function cn(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:At,this.minFilter=void 0!==u?u:At,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function un(t,e){this.min=void 0!==t?t:new Ye(1/0,1/0,1/0),this.max=void 0!==e?e:new Ye(-1/0,-1/0,-1/0)}function ln(t,e){this.center=void 0!==t?t:new Ye,this.radius=void 0!==e?e:0}function hn(t,e){this.normal=void 0!==t?t:new Ye(1,0,0),this.constant=void 0!==e?e:0}function pn(t,e,n,r,i,o){this.planes=[void 0!==t?t:new hn,void 0!==e?e:new hn,void 0!==n?n:new hn,void 0!==r?r:new hn,void 0!==i?i:new hn,void 0!==o?o:new hn]}rn.DEFAULT_IMAGE=void 0,rn.DEFAULT_MAPPING=vt,rn.prototype=Object.assign(Object.create(r.prototype),{constructor:rn,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ve.generateUUID()),e||void 0!==t.images[r.uuid]||(t.images[r.uuid]={uuid:r.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(r)}),n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===vt){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Tt:t.x=t.x-Math.floor(t.x);break;case Mt:t.x=t.x<0?0:1;break;case St:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case Tt:t.y=t.y-Math.floor(t.y);break;case Mt:t.y=t.y<0?0:1;break;case St:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(rn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(on.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,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 new Error("index is out of range: "+t)}return this},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 new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},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},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,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)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,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,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],l=o[5],h=o[9],p=o[2],d=o[6],f=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-p)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+p)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(f+1)/2,y=(s+u)/4,b=(c+p)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(c-p)*(c-p)+(u-s)*(u-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(c-p)/x,this.z=(u-s)/x,this.w=Math.acos((a+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new on,e=new on),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?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)},manhattanLength: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()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},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},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},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},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),an.prototype=Object.assign(Object.create(r.prototype),{constructor:an,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,sn.prototype.isWebGLRenderTargetCube=!0,cn.prototype=Object.create(rn.prototype),cn.prototype.constructor=cn,cn.prototype.isDataTexture=!0,Object.assign(un.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],l=t[s+1],h=t[s+2];u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),l=t.getY(s),h=t.getZ(s);u<e&&(e=u),l<n&&(n=l),h<r&&(r=h),u>i&&(i=u),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ye;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ye),this.isEmpty()?t.set(0,0,0):t.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},expandByObject:function(){var t,e,n,r=new Ye;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ye),e.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))},intersectsBox: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)},intersectsSphere:(Ke=new Ye,function(t){return this.clampPoint(t.center,Ke),Ke.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new Ye;function l(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),l=e.dot(a),h=n.dot(a);if(Math.max(-Math.max(u,l,h),Math.min(u,l,h))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var h=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!l(h)&&(!!l(h=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),l(h=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ye),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ye;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ye;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ln),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(Je=[new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye,new Ye],function(t){return this.isEmpty()?this:(Je[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Je[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Je[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Je[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Je[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Je[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Je[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Je[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Je),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)}}),Object.assign(ln.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(Qe=new un,function(t,e){var n=this.center;void 0!==e?n.copy(e):Qe.setFromPoints(t).getCenter(n);for(var r=0,i=0,o=t.length;i<o;i++)r=Math.max(r,n.distanceToSquared(t[i]));return this.radius=Math.sqrt(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},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},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ye),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new un),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=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}}),Object.assign(hn.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ye,e=new Ye;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(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 void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ye),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ye;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ye);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ye),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ye,e=new Ze;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),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}}),Object.assign(pn.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],h=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,f-h,y-m).normalize(),e[1].setComponents(a+r,l+s,f+h,y+m).normalize(),e[2].setComponents(a+i,l+c,f+p,y+v).normalize(),e[3].setComponents(a-i,l-c,f-p,y-v).normalize(),e[4].setComponents(a-o,l-u,f-d,y-g).normalize(),e[5].setComponents(a+o,l+u,f+d,y+g).normalize(),this},intersectsObject:(en=new ln,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),en.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(en)}),intersectsSprite:function(){var t=new ln;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:($e=new Ye,tn=new Ye,function(t){for(var e=this.planes,n=0;n<6;n++){var r=e[n];$e.x=r.normal.x>0?t.min.x:t.max.x,tn.x=r.normal.x>0?t.max.x:t.min.x,$e.y=r.normal.y>0?t.min.y:t.max.y,tn.y=r.normal.y>0?t.max.y:t.min.y,$e.z=r.normal.z>0?t.min.z:t.max.z,tn.z=r.normal.z>0?t.max.z:t.min.z;var i=r.distanceToPoint($e),o=r.distanceToPoint(tn);if(i<0&&o<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var dn,fn={alphamap_fragment:"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\\n",alphatest_fragment:"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\\n",aomap_fragment:"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\\n",aomap_pars_fragment:"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif",begin_vertex:"\\nvec3 transformed = vec3( position );\\n",beginnormal_vertex:"\\nvec3 objectNormal = vec3( normal );\\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n\\tif( decayExponent > 0.0 ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\t\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\t\\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t\\treturn distanceFalloff * maxDistanceCutoffFactor;\\n#else\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n#endif\\n\\t}\\n\\treturn 1.0;\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE  = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\\n\\treturn specularColor * AB.x + AB.y;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\\n\\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\t\\tvarying vec3 vViewPosition;\\n\\t#endif\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n",color_fragment:"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif",color_pars_fragment:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\\n",color_pars_vertex:"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif",color_vertex:"#ifdef USE_COLOR\\n\\tvColor.xyz = color.xyz;\\n#endif",common:"#define PI 3.14159265359\\n#define PI2 6.28318530718\\n#define PI_HALF 1.5707963267949\\n#define RECIPROCAL_PI 0.31830988618\\n#define RECIPROCAL_PI2 0.15915494\\n#define LOG2 1.442695\\n#define EPSILON 1e-6\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\\n#define cubeUV_textureSize (1024.0)\\nint getFaceFromDirection(vec3 direction) {\\n\\tvec3 absDirection = abs(direction);\\n\\tint face = -1;\\n\\tif( absDirection.x > absDirection.z ) {\\n\\t\\tif(absDirection.x > absDirection.y )\\n\\t\\t\\tface = direction.x > 0.0 ? 0 : 3;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\telse {\\n\\t\\tif(absDirection.z > absDirection.y )\\n\\t\\t\\tface = direction.z > 0.0 ? 2 : 5;\\n\\t\\telse\\n\\t\\t\\tface = direction.y > 0.0 ? 1 : 4;\\n\\t}\\n\\treturn face;\\n}\\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\\n\\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\\n\\tfloat dxRoughness = dFdx(roughness);\\n\\tfloat dyRoughness = dFdy(roughness);\\n\\tvec3 dx = dFdx( vec * scale * dxRoughness );\\n\\tvec3 dy = dFdy( vec * scale * dyRoughness );\\n\\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\\n\\td = clamp(d, 1.0, cubeUV_rangeClamp);\\n\\tfloat mipLevel = 0.5 * log2(d);\\n\\treturn vec2(floor(mipLevel), fract(mipLevel));\\n}\\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\\n\\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\\n\\tfloat a = 16.0 * cubeUV_rcpTextureSize;\\n\\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\\n\\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\\n\\tfloat powScale = exp2_packed.x * exp2_packed.y;\\n\\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\\n\\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\\n\\tbool bRes = mipLevel == 0.0;\\n\\tscale =  bRes && (scale < a) ? a : scale;\\n\\tvec3 r;\\n\\tvec2 offset;\\n\\tint face = getFaceFromDirection(direction);\\n\\tfloat rcpPowScale = 1.0 / powScale;\\n\\tif( face == 0) {\\n\\t\\tr = vec3(direction.x, -direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 1) {\\n\\t\\tr = vec3(direction.y, direction.x, direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 2) {\\n\\t\\tr = vec3(direction.z, direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\\n\\t}\\n\\telse if( face == 3) {\\n\\t\\tr = vec3(direction.x, direction.z, direction.y);\\n\\t\\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse if( face == 4) {\\n\\t\\tr = vec3(direction.y, direction.x, -direction.z);\\n\\t\\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\telse {\\n\\t\\tr = vec3(direction.z, -direction.x, direction.y);\\n\\t\\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\\n\\t\\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\\n\\t}\\n\\tr = normalize(r);\\n\\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\\n\\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\\n\\tvec2 base = offset + vec2( texelOffset );\\n\\treturn base + s * ( scale - 2.0 * texelOffset );\\n}\\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\\n\\tfloat roughnessVal = roughness* cubeUV_maxLods3;\\n\\tfloat r1 = floor(roughnessVal);\\n\\tfloat r2 = r1 + 1.0;\\n\\tfloat t = fract(roughnessVal);\\n\\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\\n\\tfloat s = mipInfo.y;\\n\\tfloat level0 = mipInfo.x;\\n\\tfloat level1 = level0 + 1.0;\\n\\tlevel1 = level1 > 5.0 ? 5.0 : level1;\\n\\tlevel0 += min( floor( s + 0.5 ), 5.0 );\\n\\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\\n\\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\\n\\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\\n\\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\\n\\tvec4 result = mix(color10, color20, t);\\n\\treturn vec4(result.rgb, 1.0);\\n}\\n#endif\\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\\n#endif\\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\\n",encodings_pars_fragment:"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\n\\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM            = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\\n\\tfloat D      = max( maxRange / maxRGB, 1.0 );\\n\\tD            = min( floor( D ) / 255.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value )  {\\n\\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\\n\\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract(Le);\\n\\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\\n\\treturn vec4( max(vRGB, 0.0), 1.0 );\\n}\\n",envmap_fragment:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\tvec2 sampleUV;\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\tvec4 envColor = texture2D( envMap, sampleUV );\\n\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\treflectVec = normalize( reflectVec );\\n\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\\n\\t\\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\\n\\tuniform float reflectivity;\\n\\tuniform float envMapIntensity;\\n#endif\\n#ifdef USE_ENVMAP\\n\\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\\n",envmap_vertex:"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\n",fog_vertex:"\\n#ifdef USE_FOG\\nfogDepth = -mvPosition.z;\\n#endif",fog_pars_vertex:"#ifdef USE_FOG\\n  varying float fogDepth;\\n#endif\\n",fog_fragment:"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\\n",fog_pars_fragment:"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\\n",gradientmap_pars_fragment:"#ifdef TOON\\n\\tuniform sampler2D gradientMap;\\n\\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\t\\tfloat dotNL = dot( normal, lightDirection );\\n\\t\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t\\t#ifdef USE_GRADIENTMAP\\n\\t\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t\\t#else\\n\\t\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\\n\\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n#endif\\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",lights_pars_begin:"uniform vec3 ambientLightColor;\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t\\tfloat shadowCameraNear;\\n\\t\\tfloat shadowCameraFar;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t\\tint shadow;\\n\\t\\tfloat shadowBias;\\n\\t\\tfloat shadowRadius;\\n\\t\\tvec2 shadowMapSize;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\\n\\t\\t#elif defined( ENVMAP_TYPE_EQUIREC )\\n\\t\\t\\tvec2 sampleUV;\\n\\t\\t\\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\t\\t\\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_SPHERE )\\n\\t\\t\\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\\n",lights_phong_fragment:"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tvec3\\tspecularColor;\\n\\tfloat\\tspecularShininess;\\n\\tfloat\\tspecularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifdef TOON\\n\\t\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#else\\n\\t\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\t\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#endif\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\\n",lights_physical_fragment:"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\\n#ifdef STANDARD\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n\\tmaterial.clearCoat = saturate( clearCoat );\\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\\n#endif\\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\\n\\tvec3\\tdiffuseColor;\\n\\tfloat\\tspecularRoughness;\\n\\tvec3\\tspecularColor;\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoat;\\n\\t\\tfloat clearCoatRoughness;\\n\\t#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(    0, 1,    0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifndef STANDARD\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\\n\\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t#ifndef STANDARD\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\tfloat dotNL = dotNV;\\n\\t\\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\\n\\t#else\\n\\t\\tfloat clearCoatDHR = 0.0;\\n\\t#endif\\n\\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\\n\\t#ifndef STANDARD\\n\\t\\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\\n\\t#endif\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\\n",lights_fragment_begin:"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = normalize( vViewPosition );\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#ifdef USE_SHADOWMAP\\n\\t\\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearCoatRadiance = vec3( 0.0 );\\n#endif\\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#ifndef STANDARD\\n\\t\\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\\n\\t#endif\\n#endif\\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\\n#endif\\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\\n\\tuniform float logDepthBufFC;\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n#endif\\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t#endif\\n\\tuniform float logDepthBufFC;\\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t#else\\n\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\tgl_Position.z *= gl_Position.w;\\n\\t#endif\\n#endif\\n",map_fragment:"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\\n",map_pars_fragment:"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n",map_particle_fragment:"#ifdef USE_MAP\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n",map_particle_pars_fragment:"#ifdef USE_MAP\\n\\tuniform mat3 uvTransform;\\n\\tuniform sampler2D map;\\n#endif\\n",metalnessmap_fragment:"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\\n#endif\\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\\n\\t#ifndef USE_MORPHNORMALS\\n\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\\n\\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\\n\\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\\n\\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\\n\\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\\n\\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\\n\\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\\n\\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\\n",normal_fragment_begin:"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n#endif\\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\\n\\tnormal = perturbNormal2Arb( -vViewPosition, normal );\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\t\\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t\\tmapN.xy = normalScale * mapN.xy;\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\\ngl_Position = projectionMatrix * mvPosition;\\n",dithering_fragment:"#if defined( DITHERING )\\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\\n",dithering_pars_fragment:"#if defined( DITHERING )\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\\n",roughnessmap_fragment:"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\\n\\t\\tconst vec2 offset = vec2( 0.0, 1.0 );\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / size;\\n\\t\\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\\n\\t\\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\\n\\t\\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\\n\\t\\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\\n\\t\\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\\n\\t\\tvec2 f = fract( uv * size + 0.5 );\\n\\t\\tfloat a = mix( lb, lt, f.y );\\n\\t\\tfloat b = mix( rb, rt, f.y );\\n\\t\\tfloat c = mix( a, b, f.x );\\n\\t\\treturn c;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\\n\\t#endif\\n#endif\\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\\n\\t}\\n\\t#endif\\n#endif\\n",shadowmask_pars_fragment:"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHTS > 0\\n\\tDirectionalLight directionalLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHTS > 0\\n\\tSpotLight spotLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#if NUM_POINT_LIGHTS > 0\\n\\tPointLight pointLight;\\n\\t#pragma unroll_loop\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\\n",skinbase_vertex:"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\\n",skinning_vertex:"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\\n",skinnormal_vertex:"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n#endif\\n",specularmap_fragment:"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\\n",tonemapping_pars_fragment:"#ifndef saturate\\n\\t#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nuniform float toneMappingWhitePoint;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\\nvec3 Uncharted2ToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvarying vec2 vUv;\\n\\tuniform mat3 uvTransform;\\n#endif\\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = uv2;\\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\\n#endif\\n",cube_frag:"uniform samplerCube tCube;\\nuniform float tFlip;\\nuniform float opacity;\\nvarying vec3 vWorldPosition;\\nvoid main() {\\n\\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\\n\\tgl_FragColor.a *= opacity;\\n}\\n",cube_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\\n",depth_frag:"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\\n\\t#endif\\n}\\n",depth_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n}\\n",distanceRGBA_frag:"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\\n",distanceRGBA_vert:"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\\n",equirect_frag:"uniform sampler2D tEquirect;\\nvarying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldPosition );\\n\\tvec2 sampleUV;\\n\\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n}\\n",equirect_vert:"varying vec3 vWorldPosition;\\n#include <common>\\nvoid main() {\\n\\tvWorldPosition = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\\n",linedashed_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",linedashed_vert:"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\tvLineDistance = scale * lineDistance;\\n\\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshbasic_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",meshbasic_vert:"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshlambert_frag:"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshlambert_vert:"#define LAMBERT\\nvarying vec3 vLightFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphong_frag:"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphong_vert:"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",meshphysical_frag:"#define PHYSICAL\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifndef STANDARD\\n\\tuniform float clearCoat;\\n\\tuniform float clearCoatRoughness;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <lights_pars_begin>\\n#include <lights_pars_maps>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\\n",meshphysical_vert:"#define PHYSICAL\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",normal_frag:"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\nvoid main() {\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\\n",normal_vert:"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\\n",points_frag:"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\\n",points_vert:"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tgl_PointSize = size * ( scale / - mvPosition.z );\\n\\t#else\\n\\t\\tgl_PointSize = size;\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n",shadow_frag:"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <fog_fragment>\\n}\\n",shadow_vert:"#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\\n"},mn={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},vn={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,rebeccapurple:6697881,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};function gn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(gn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=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,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ve.euclideanModulo(e,1),n=Ve.clamp(n,0,1),r=Ve.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\\(\\s*([^\\)]*)\\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\\.?[0-9]+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(,\\s*([0-9]*\\.?[0-9]+)\\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\\#([A-Fa-f0-9]+)$/.exec(t)){var u,l=(u=n[1]).length;if(3===l)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=vn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,this.b=n*n,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){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(dn={},function(t,e,n){return this.getHSL(dn),dn.h+=t,dn.s+=e,dn.l+=n,this.setHSL(dn.h,dn.s,dn.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},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),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,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var yn,bn={common:{diffuse:{value:new gn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ze},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new We(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new gn(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new gn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Ze}}},_n={basic:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.fog]),vertexShader:fn.meshbasic_vert,fragmentShader:fn.meshbasic_frag},lambert:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.fog,bn.lights,{emissive:{value:new gn(0)}}]),vertexShader:fn.meshlambert_vert,fragmentShader:fn.meshlambert_frag},phong:{uniforms:mn.merge([bn.common,bn.specularmap,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.gradientmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},specular:{value:new gn(1118481)},shininess:{value:30}}]),vertexShader:fn.meshphong_vert,fragmentShader:fn.meshphong_frag},standard:{uniforms:mn.merge([bn.common,bn.envmap,bn.aomap,bn.lightmap,bn.emissivemap,bn.bumpmap,bn.normalmap,bn.displacementmap,bn.roughnessmap,bn.metalnessmap,bn.fog,bn.lights,{emissive:{value:new gn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},points:{uniforms:mn.merge([bn.points,bn.fog]),vertexShader:fn.points_vert,fragmentShader:fn.points_frag},dashed:{uniforms:mn.merge([bn.common,bn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:fn.linedashed_vert,fragmentShader:fn.linedashed_frag},depth:{uniforms:mn.merge([bn.common,bn.displacementmap]),vertexShader:fn.depth_vert,fragmentShader:fn.depth_frag},normal:{uniforms:mn.merge([bn.common,bn.bumpmap,bn.normalmap,bn.displacementmap,{opacity:{value:1}}]),vertexShader:fn.normal_vert,fragmentShader:fn.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:fn.cube_vert,fragmentShader:fn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:fn.equirect_vert,fragmentShader:fn.equirect_frag},distanceRGBA:{uniforms:mn.merge([bn.common,bn.displacementmap,{referencePosition:{value:new Ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:fn.distanceRGBA_vert,fragmentShader:fn.distanceRGBA_frag},shadow:{uniforms:mn.merge([bn.lights,bn.fog,{color:{value:new gn(0)},opacity:{value:1}}]),vertexShader:fn.shadow_vert,fragmentShader:fn.shadow_frag}};function xn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function wn(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||wn.DefaultOrder}function En(){this.mask=1}_n.physical={uniforms:mn.merge([_n.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:fn.meshphysical_vert,fragmentShader:fn.meshphysical_frag},wn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],wn.DefaultOrder="XYZ",Object.defineProperties(wn.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(wn.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},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,n){var r=Ve.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],l=i[9],h=i[2],p=i[6],d=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(p,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,u),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(p,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new Xe;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(yn=new qe,function(t){return yn.setFromEuler(this),this.setFromQuaternion(yn,t)}),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(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._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ye(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(En.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Tn,Mn,Sn,An,Rn=0;function Cn(){Object.defineProperty(this,"id",{value:Rn++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Cn.DefaultUp.clone();var t=new Ye,e=new wn,n=new qe,r=new Ye(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new Xe},normalMatrix:{value:new Ze}}),this.matrix=new Xe,this.matrixWorld=new Xe,this.matrixAutoUpdate=Cn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new En,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function Ln(){Cn.call(this),this.type="Camera",this.matrixWorldInverse=new Xe,this.projectionMatrix=new Xe}function Pn(t,e,n,r,i,o){Ln.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function Nn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ye,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new gn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}Cn.DefaultUp=new Ye(0,1,0),Cn.DefaultMatrixAutoUpdate=!0,Cn.prototype=Object.assign(Object.create(r.prototype),{constructor:Cn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},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:(An=new qe,function(t,e){return An.setFromAxisAngle(t,e),this.quaternion.multiply(An),this}),rotateOnWorldAxis:function(){var t=new qe;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ye(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ye(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ye(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ye;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ye(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ye(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ye(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Sn=new Xe,function(t){return t.applyMatrix4(Sn.getInverse(this.matrixWorld))}),lookAt:function(){var t=new Xe,e=new Ye;return function(n,r,i){n.isVector3?e.copy(n):e.set(n,r,i),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ye),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Tn=new Ye,Mn=new Ye,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new qe),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Tn,t,Mn),t}),getWorldScale:function(){var t=new Ye,e=new qe;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ye),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),void 0!==this.geometry){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(i(t.materials,this.material[s]));r.material=l}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var h=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);a=m(t.shapes);h.length>0&&(n.geometries=h),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Ln.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Ln,isCamera:!0,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new qe;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ye),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){Cn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Pn.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Pn,isOrthographicCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;o=(i+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(a-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(Nn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var On,In,Dn=0;function Fn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Un(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Hn(t,e,n){Un.call(this,new Int8Array(t),e,n)}function Bn(t,e,n){Un.call(this,new Uint8Array(t),e,n)}function zn(t,e,n){Un.call(this,new Uint8ClampedArray(t),e,n)}function kn(t,e,n){Un.call(this,new Int16Array(t),e,n)}function Gn(t,e,n){Un.call(this,new Uint16Array(t),e,n)}function jn(t,e,n){Un.call(this,new Int32Array(t),e,n)}function Vn(t,e,n){Un.call(this,new Uint32Array(t),e,n)}function Wn(t,e,n){Un.call(this,new Float32Array(t),e,n)}function Xn(t,e,n){Un.call(this,new Float64Array(t),e,n)}function qn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Yn(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}Fn.prototype=Object.assign(Object.create(r.prototype),{constructor:Fn,isGeometry:!0,applyMatrix:function(t){for(var e=(new Ze).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:(In=new Cn,function(t){In.lookAt(t),In.updateMatrix(),this.applyMatrix(In.matrix)}),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],l=[],h=[],p=0,d=0;p<i.length;p+=3,d+=2)e.vertices.push(new Ye(i[p],i[p+1],i[p+2])),void 0!==o&&u.push(new Ye(o[p],o[p+1],o[p+2])),void 0!==a&&e.colors.push(new gn(a[p],a[p+1],a[p+2])),void 0!==s&&l.push(new We(s[d],s[d+1])),void 0!==c&&h.push(new We(c[d],c[d+1]));function f(t,n,r,i){var p=new Nn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[n].clone(),l[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([h[t].clone(),h[n].clone(),h[r].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var v=m[p],g=v.start,y=(d=g,g+v.count);d<y;d+=3)void 0!==n?f(n[d],n[d+1],n[d+2],v.materialIndex):f(d,d+1,d+2,v.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)f(n[p],n[p+1],n[p+2]);else for(p=0;p<i.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(On=new Ye,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(On).negate(),this.translate(On.x,On.y,On.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new Xe;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ye,e=new Ye,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ye;if(t){var s,c,u,l=new Ye,h=new Ye;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],l.subVectors(u,c),h.subVectors(s,c),l.cross(h),a[o.a].add(l),a[o.b].add(l),a[o.c].add(l)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var p=(o=this.faces[r]).vertexNormals;3===p.length?(p[0].copy(a[o.a]),p[1].copy(a[o.b]),p[2].copy(a[o.c])):(p[0]=a[o.a].clone(),p[1]=a[o.b].clone(),p[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Fn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ye,u={a:new Ye,b:new Ye,c:new Ye},a.push(c),s.push(u)}var c,u,l=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=l.faceNormals[n],u=l.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ln),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,p=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new Ze).getNormalMatrix(e));for(var d=0,f=a.length;d<f;d++){var m=a[d].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(d=0,f=p.length;d<f;d++)h.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var v,g,y,b=c[d],_=b.vertexNormals,x=b.vertexColors;(v=new Nn(b.a+i,b.b+i,b.c+i)).normal.copy(b.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var w=0,E=_.length;w<E;w++)g=_[w].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(b.color);for(w=0,E=x.length;w<E;w++)y=x[w],v.vertexColors.push(y.clone());v.materialIndex=b.materialIndex+n,s.push(v)}for(d=0,f=l.length;d<f;d++){var T=l[d],M=[];if(void 0!==T){for(w=0,E=T.length;w<E;w++)M.push(T[w].clone());u.push(M)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h)]?(c[e]=n,u.push(this.vertices[n]),l[n]=u.length-1):l[n]=l[c[e]];var p=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){p.push(n);break}}for(n=p.length-1;n>=0;n--){var f=p[n];for(this.faces.splice(f,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(f,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ye(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],l={},h=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,b=0;if(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b=E(b,0,0),1,!0),2,!1),3,f),4,m),5,v),6,g),7,y),a.push(b),a.push(d.a,d.b,d.c),a.push(d.materialIndex),f){var _=this.faceVertexUvs[0][i];a.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&a.push(T(d.normal)),v){var x=d.vertexNormals;a.push(T(x[0]),T(x[1]),T(x[2]))}if(g&&a.push(M(d.color)),y){var w=d.vertexColors;a.push(M(w[0]),M(w[1]),M(w[2]))}}function E(t,e,n){return n?t|1<<e:t&~(1<<e)}function T(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function M(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]?l[e]:(l[e]=u.length,u.push(t.getHex()),l[e])}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=h.length/2,h.push(t.x,t.y),p[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),h.length>0&&(t.data.uvs=[h]),t.data.faces=a,t},clone:function(){return(new Fn).copy(this)},copy:function(t){var e,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],p=[];for(o=0,a=h.length;o<a;o++){var d=h[o];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,n=f.length;e<n;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],r=0,i=f[e].vertices.length;r<i;r++)m.vertices.push(f[e].vertices[r].clone());if(void 0!==f[e].normals)for(m.normals=[],r=0,i=f[e].normals.length;r<i;r++)m.normals.push(f[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var E=t.boundingBox;null!==E&&(this.boundingBox=E.clone());var T=t.boundingSphere;return null!==T&&(this.boundingSphere=T.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Un.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Un.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new gn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new We),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ye),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new on),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),Hn.prototype=Object.create(Un.prototype),Hn.prototype.constructor=Hn,Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,zn.prototype=Object.create(Un.prototype),zn.prototype.constructor=zn,kn.prototype=Object.create(Un.prototype),kn.prototype.constructor=kn,Gn.prototype=Object.create(Un.prototype),Gn.prototype.constructor=Gn,jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,Vn.prototype=Object.create(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=Object.create(Un.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(Un.prototype),Xn.prototype.constructor=Xn,Object.assign(qn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]=[];this.morphTargets.position=e}var l,h=t.morphNormals,p=h.length;if(p>0){l=[];for(u=0;u<p;u++)l[u]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===r.length,v=f.length===r.length;for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var b=g.normal;this.normals.push(b,b,b)}var _,x=g.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new We,new We,new We));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new We,new We,new We));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[g.a],T[g.b],T[g.c])}for(E=0;E<p;E++){var M=h[E].vertexNormals[u];l[E].push(M.a,M.b,M.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Zn=1;function Jn(){Object.defineProperty(this,"id",{value:Zn+=2}),this.uuid=Ve.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function Kn(t,e,n,r,i,o){Fn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new Qn(t,e,n,r,i,o)),this.mergeVertices()}function Qn(t,e,n,r,i,o){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],l=[],h=0,p=0;function d(t,e,n,r,i,o,d,f,m,v,g){var y,b,_=o/m,x=d/v,w=o/2,E=d/2,T=f/2,M=m+1,S=v+1,A=0,R=0,C=new Ye;for(b=0;b<S;b++){var L=b*x-E;for(y=0;y<M;y++){var P=y*_-w;C[t]=P*r,C[e]=L*i,C[n]=T,c.push(C.x,C.y,C.z),C[t]=0,C[e]=0,C[n]=f>0?1:-1,u.push(C.x,C.y,C.z),l.push(y/m),l.push(1-b/v),A+=1}}for(b=0;b<v;b++)for(y=0;y<m;y++){var N=h+y+M*b,O=h+y+M*(b+1),I=h+(y+1)+M*(b+1),D=h+(y+1)+M*b;s.push(N,O,D),s.push(O,I,D),R+=6}a.addGroup(p,R,g),p+=R,h+=A}d("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),d("z","y","x",1,-1,n,e,-t,o,i,1),d("x","z","y",1,1,t,n,e,r,o,2),d("x","z","y",1,-1,t,n,-e,r,o,3),d("x","y","z",1,-1,t,e,n,r,i,4),d("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}function $n(t,e,n,r){Fn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new tr(t,e,n,r)),this.mergeVertices()}function tr(t,e,n,r){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,l=c+1,h=u+1,p=t/c,d=e/u,f=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*p-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),E=i+1+l*o;f.push(_,x,E),f.push(x,w,E)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}Jn.prototype=Object.assign(Object.create(r.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Yn(t)>65535?Vn:Gn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new Un(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Ze).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new Xe;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new Xe;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new Xe;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new Xe;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new Xe;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new Cn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ye;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Wn(3*e.vertices.length,3),r=new Wn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Wn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Wn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new qn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new Un(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new Un(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new Un(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new Un(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new Un(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,l=c.length;u<l;u++){var h=c[u],p=new Wn(3*h.length,3);s.push(p.copyVector3sArray(h))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var d=new Wn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new Wn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new un);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(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.\',this)},computeBoundingSphere:function(){var t=new un,e=new Ye;return function(){null===this.boundingSphere&&(this.boundingSphere=new ln);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error(\'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.\',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new Un(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,c,u,l=e.normal.array,h=new Ye,p=new Ye,d=new Ye,f=new Ye,m=new Ye;if(t){var v=t.array;0===n.length&&this.addGroup(0,v.length);for(var g=0,y=n.length;g<y;++g){var b=n[g],_=b.start;for(o=_,a=_+b.count;o<a;o+=3)s=3*v[o+0],c=3*v[o+1],u=3*v[o+2],h.fromArray(r,s),p.fromArray(r,c),d.fromArray(r,u),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[u]+=f.x,l[u+1]+=f.y,l[u+2]+=f.z}}else for(o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),p.fromArray(r,o+3),d.fromArray(r,o+6),f.subVectors(d,p),m.subVectors(h,p),f.cross(m),l[o]=f.x,l[o+1]=f.y,l[o+2]=f.z,l[o+3]=f.x,l[o+4]=f.y,l[o+5]=f.z,l[o+6]=f.x,l[o+7]=f.y,l[o+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ye;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Jn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,l=0,h=e.length;l<h;l++){c=e[l]*a;for(var p=0;p<a;p++)s[u++]=o[c++]}t.addAttribute(r,new Un(s,a))}var d=this.groups;for(l=0,h=d.length;l<h;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Jn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Kn.prototype=Object.create(Fn.prototype),Kn.prototype.constructor=Kn,Qn.prototype=Object.create(Jn.prototype),Qn.prototype.constructor=Qn,$n.prototype=Object.create(Fn.prototype),$n.prototype.constructor=$n,tr.prototype=Object.create(Jn.prototype),tr.prototype.constructor=tr;var er,nr,rr,ir,or,ar,sr,cr=0;function ur(){Object.defineProperty(this,"id",{value:cr++}),this.uuid=Ve.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=O,this.side=T,this.flatShading=!1,this.vertexColors=C,this.opacity=1,this.transparent=!1,this.blendSrc=q,this.blendDst=Y,this.blendEquation=H,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rt,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function lr(t){ur.call(this),this.type="MeshBasicMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function hr(t){ur.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}",this.fragmentShader="void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function pr(t,e){this.origin=void 0!==t?t:new Ye,this.direction=void 0!==e?e:new Ye}function dr(t,e){this.start=void 0!==t?t:new Ye,this.end=void 0!==e?e:new Ye}function fr(t,e,n){this.a=void 0!==t?t:new Ye,this.b=void 0!==e?e:new Ye,this.c=void 0!==n?n:new Ye}function mr(t,e){Cn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new lr({color:16777215*Math.random()}),this.drawMode=Pe,this.updateMorphTargets()}function vr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function gr(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:gt,rn.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}ur.prototype=Object.assign(Object.create(r.prototype),{constructor:ur,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": \'"+e+"\' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===A;else console.warn("THREE.Material: \'"+e+"\' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==O&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==T&&(n.side=this.side),this.vertexColors!==C&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),lr.prototype=Object.create(ur.prototype),lr.prototype.constructor=lr,lr.prototype.isMeshBasicMaterial=!0,lr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},hr.prototype=Object.create(ur.prototype),hr.prototype.constructor=hr,hr.prototype.isShaderMaterial=!0,hr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},hr.prototype.toJSON=function(t){var e=ur.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(pr.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ye),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ye;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ye),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ye;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(nr=new Ye,rr=new Ye,ir=new Ye,function(t,e,n,r){nr.copy(t).add(e).multiplyScalar(.5),rr.copy(e).sub(t).normalize(),ir.copy(this.origin).sub(nr);var i,o,a,s,c=.5*t.distanceTo(e),u=-this.direction.dot(rr),l=ir.dot(this.direction),h=-ir.dot(rr),p=ir.lengthSq(),d=Math.abs(1-u*u);if(d>0)if(o=u*l-h,s=c*d,(i=u*h-l)>=0)if(o>=-s)if(o<=s){var f=1/d;a=(i*=f)*(i+u*(o*=f)+2*l)+o*(u*i+o+2*h)+p}else o=c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o=-c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;else o<=-s?a=-(i=Math.max(0,-(-u*c+l)))*i+(o=i>0?-c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p:o<=s?(i=0,a=(o=Math.min(Math.max(-c,-h),c))*(o+2*h)+p):a=-(i=Math.max(0,-(u*c+l)))*i+(o=i>0?c:Math.min(Math.max(-c,-h),c))*(o+2*h)+p;else o=u>0?-c:c,a=-(i=Math.max(0,-(u*o+l)))*i+o*(o+2*h)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(rr).multiplyScalar(o).add(nr),a}),intersectSphere:function(){var t=new Ye;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,l=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:(er=new Ye,function(t){return null!==this.intersectBox(t,er)}),intersectTriangle:function(){var t=new Ye,e=new Ye,n=new Ye,r=new Ye;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,l=this.direction.dot(r);if(l>0){if(s)return null;u=1}else{if(!(l<0))return null;u=-1,l=-l}t.subVectors(this.origin,i);var h=u*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var p=u*this.direction.dot(e.cross(t));if(p<0)return null;if(h+p>l)return null;var d=-u*t.dot(r);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(dr.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ye),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ye),t.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){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ye),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(or=new Ye,ar=new Ye,function(t,e){or.subVectors(t,this.start),ar.subVectors(this.end,this.start);var n=ar.dot(ar),r=ar.dot(or)/n;return e&&(r=Ve.clamp(r,0,1)),r}),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ye),this.delta(n).multiplyScalar(r).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)}}),Object.assign(fr,{getNormal:(sr=new Ye,function(t,e,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new Ye),r.subVectors(n,e),sr.subVectors(t,e),r.cross(sr);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}),getBarycoord:function(){var t=new Ye,e=new Ye,n=new Ye;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),l=t.dot(n),h=e.dot(e),p=e.dot(n),d=c*h-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ye),0===d)return s.set(-2,-1,-1);var f=1/d,m=(h*l-u*p)*f,v=(c*p-u*l)*f;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ye;return function(e,n,r,i){return fr.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(fr.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ye,e=new Ye;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ye),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return fr.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ye),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return fr.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return fr.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new hn,e=[new dr,new dr,new dr],n=new Ye,r=new Ye;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new Ye);var a=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<a&&(a=c,o.copy(r))}}return o}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),mr.prototype=Object.assign(Object.create(Cn.prototype),{constructor:mr,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return Cn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new Xe,e=new pr,n=new ln,r=new Ye,i=new Ye,o=new Ye,a=new Ye,s=new Ye,c=new Ye,u=new We,l=new We,h=new We,p=new Ye,d=new Ye,f=new Ye;function m(t,e,n,r,i,o,a){return fr.getBarycoord(t,e,n,r,p),i.multiplyScalar(p.x),o.multiplyScalar(p.y),a.multiplyScalar(p.z),i.add(o).add(a),i.clone()}function v(t,e,n,r,i,o,a,s){if(null===(e.side===M?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==S,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(f);return c<n.near||c>n.far?null:{distance:c,point:f.clone(),object:t}}function g(t,e,n,a,s,c,p,f){r.fromBufferAttribute(a,c),i.fromBufferAttribute(a,p),o.fromBufferAttribute(a,f);var g=v(t,t.material,e,n,r,i,o,d);if(g){s&&(u.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),h.fromBufferAttribute(s,f),g.uv=m(d,r,i,o,u,l,h));var y=new Nn(c,p,f);fr.getNormal(r,i,o,y.normal),g.face=y,g.faceIndex=c}return g}return function(p,f){var y,b=this.geometry,_=this.material,x=this.matrixWorld;if(void 0!==_&&(null===b.boundingSphere&&b.computeBoundingSphere(),n.copy(b.boundingSphere),n.applyMatrix4(x),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(x),e.copy(p.ray).applyMatrix4(t),null===b.boundingBox||!1!==e.intersectsBox(b.boundingBox))))if(b.isBufferGeometry){var w,E,T,M,S,A=b.index,R=b.attributes.position,C=b.attributes.uv;if(null!==A)for(M=0,S=A.count;M<S;M+=3)w=A.getX(M),E=A.getX(M+1),T=A.getX(M+2),(y=g(this,p,e,R,C,w,E,T))&&(y.faceIndex=Math.floor(M/3),f.push(y));else if(void 0!==R)for(M=0,S=R.count;M<S;M+=3)(y=g(this,p,e,R,C,w=M,E=M+1,T=M+2))&&f.push(y)}else if(b.isGeometry){var L,P,N,O,I=Array.isArray(_),D=b.vertices,F=b.faces,U=b.faceVertexUvs[0];U.length>0&&(O=U);for(var H=0,B=F.length;H<B;H++){var z=F[H],k=I?_[z.materialIndex]:_;if(void 0!==k){if(L=D[z.a],P=D[z.b],N=D[z.c],!0===k.morphTargets){var G=b.morphTargets,j=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=j[V];if(0!==X){var q=G[V].vertices;r.addScaledVector(a.subVectors(q[z.a],L),X),i.addScaledVector(s.subVectors(q[z.b],P),X),o.addScaledVector(c.subVectors(q[z.c],N),X)}}r.add(L),i.add(P),o.add(N),L=r,P=i,N=o}if(y=v(this,k,p,e,L,P,N,d)){if(O&&O[H]){var Y=O[H];u.copy(Y[0]),l.copy(Y[1]),h.copy(Y[2]),y.uv=m(d,L,P,N,u,l,h)}y.face=z,y.faceIndex=H,f.push(y)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),gr.prototype=Object.create(rn.prototype),gr.prototype.constructor=gr,gr.prototype.isCubeTexture=!0,Object.defineProperty(gr.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var yr=new rn,br=new gr;function _r(){this.seq=[],this.map={}}var xr=[],wr=[],Er=new Float32Array(16),Tr=new Float32Array(9);function Mr(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=xr[i];if(void 0===o&&(o=new Float32Array(i),xr[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Sr(t,e){var n=wr[e];void 0===n&&(n=new Int32Array(e),wr[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function Ar(t,e){t.uniform1f(this.addr,e)}function Rr(t,e){t.uniform1i(this.addr,e)}function Cr(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function Lr(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function Pr(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function Nr(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function Or(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Tr.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Tr))}function Ir(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Er.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Er))}function Dr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||yr,r)}function Fr(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||br,r)}function Ur(t,e){t.uniform2iv(this.addr,e)}function Hr(t,e){t.uniform3iv(this.addr,e)}function Br(t,e){t.uniform4iv(this.addr,e)}function zr(t,e){t.uniform1fv(this.addr,e)}function kr(t,e){t.uniform1iv(this.addr,e)}function Gr(t,e){t.uniform2fv(this.addr,Mr(e,this.size,2))}function jr(t,e){t.uniform3fv(this.addr,Mr(e,this.size,3))}function Vr(t,e){t.uniform4fv(this.addr,Mr(e,this.size,4))}function Wr(t,e){t.uniformMatrix2fv(this.addr,!1,Mr(e,this.size,4))}function Xr(t,e){t.uniformMatrix3fv(this.addr,!1,Mr(e,this.size,9))}function qr(t,e){t.uniformMatrix4fv(this.addr,!1,Mr(e,this.size,16))}function Yr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||yr,i[o])}function Zr(t,e,n){var r=e.length,i=Sr(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||br,i[o])}function Jr(t,e,n){this.id=t,this.addr=n,this.setValue=function(t){switch(t){case 5126:return Ar;case 35664:return Cr;case 35665:return Lr;case 35666:return Pr;case 35674:return Nr;case 35675:return Or;case 35676:return Ir;case 35678:case 36198:return Dr;case 35680:return Fr;case 5124:case 35670:return Rr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Kr(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return zr;case 35664:return Gr;case 35665:return jr;case 35666:return Vr;case 35674:return Wr;case 35675:return Xr;case 35676:return qr;case 35678:return Yr;case 35680:return Zr;case 5124:case 35670:return kr;case 35667:case 35671:return Ur;case 35668:case 35672:return Hr;case 35669:case 35673:return Br}}(e.type)}function Qr(t){this.id=t,_r.call(this)}Qr.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var $r=/([\\w\\d_]+)(\\])?(\\[|\\.)?/g;function ti(t,e){t.seq.push(e),t.map[e.id]=e}function ei(t,e,n){var r=t.name,i=r.length;for($r.lastIndex=0;;){var o=$r.exec(r),a=$r.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){ti(n,void 0===u?new Jr(s,t,e):new Kr(s,t,e));break}var l=n.map[s];void 0===l&&ti(n,l=new Qr(s)),n=l}}function ni(t,e,n){_r.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);ei(o,t.getUniformLocation(e,o.name),this)}}function ri(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn\'t compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\\n")}(n)),r}ni.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},ni.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},ni.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},ni.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var ii=0;function oi(t){switch(t){case Ie:return["Linear","( value )"];case De:return["sRGB","( value )"];case Ue:return["RGBE","( value )"];case Be:return["RGBM","( value, 7.0 )"];case ze:return["RGBM","( value, 16.0 )"];case ke:return["RGBD","( value, 256.0 )"];case Fe:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function ai(t,e){var n=oi(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function si(t){return""!==t}function ci(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function ui(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function li(t){return t.replace(/^[ \\t]*#include +<([\\w\\d.]+)>/gm,function(t,e){var n=fn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return li(n)})}function hi(t){return t.replace(/#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\\[ i \\]/g,"[ "+o+" ]");return i})}function pi(t,e,n,r,i,o){var a=t.context,s=r.defines,c=i.vertexShader,u=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===w?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===E&&(l="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case gt:case yt:h="ENVMAP_TYPE_CUBE";break;case wt:case Et:h="ENVMAP_TYPE_CUBE_UV";break;case bt:case _t:h="ENVMAP_TYPE_EQUIREC";break;case xt:h="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case yt:case _t:p="ENVMAP_MODE_REFRACTION"}switch(r.combine){case ct:d="ENVMAP_BLENDING_MULTIPLY";break;case ut:d="ENVMAP_BLENDING_MIX";break;case lt:d="ENVMAP_BLENDING_ADD"}}var f,m,v,g,y,b=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(si).join("\\n")}(r.extensions,o,e),x=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\\n")}(s),T=a.createProgram();r.isRawShaderMaterial?((f=[x].filter(si).join("\\n")).length>0&&(f+="\\n"),(m=[_,x].filter(si).join("\\n")).length>0&&(m+="\\n")):(f=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+p:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\\tattribute vec3 morphTarget0;","\\tattribute vec3 morphTarget1;","\\tattribute vec3 morphTarget2;","\\tattribute vec3 morphTarget3;","\\t#ifdef USE_MORPHNORMALS","\\t\\tattribute vec3 morphNormal0;","\\t\\tattribute vec3 morphNormal1;","\\t\\tattribute vec3 morphNormal2;","\\t\\tattribute vec3 morphNormal3;","\\t#else","\\t\\tattribute vec3 morphTarget4;","\\t\\tattribute vec3 morphTarget5;","\\t\\tattribute vec3 morphTarget6;","\\t\\tattribute vec3 morphTarget7;","\\t#endif","#endif","#ifdef USE_SKINNING","\\tattribute vec4 skinIndex;","\\tattribute vec4 skinWeight;","#endif","\\n"].filter(si).join("\\n"),m=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,x,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+b,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.envMap?"#define "+p:"",o.envMap?"#define "+d:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==ht?"#define TONE_MAPPING":"",o.toneMapping!==ht?fn.tonemapping_pars_fragment:"",o.toneMapping!==ht?function(t,e){var n;switch(e){case pt:n="Linear";break;case dt:n="Reinhard";break;case ft:n="Uncharted2";break;case mt:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?fn.encodings_pars_fragment:"",o.mapEncoding?ai("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?ai("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?ai("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?(v="linearToOutputTexel",g=o.outputEncoding,y=oi(g),"vec4 "+v+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\\n"].filter(si).join("\\n")),c=ui(c=ci(c=li(c),o),o),u=ui(u=ci(u=li(u),o),o);var M=f+(c=hi(c)),S=m+(u=hi(u)),A=ri(a,a.VERTEX_SHADER,M),R=ri(a,a.FRAGMENT_SHADER,S);a.attachShader(T,A),a.attachShader(T,R),void 0!==r.index0AttributeName?a.bindAttribLocation(T,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(T,0,"position"),a.linkProgram(T);var C,L,P=a.getProgramInfoLog(T).trim(),N=a.getShaderInfoLog(A).trim(),O=a.getShaderInfoLog(R).trim(),I=!0,D=!0;return!1===a.getProgramParameter(T,a.LINK_STATUS)?(I=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(T,a.VALIDATE_STATUS),"gl.getProgramInfoLog",P,N,O)):""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==N&&""!==O||(D=!1),D&&(this.diagnostics={runnable:I,material:r,programLog:P,vertexShader:{log:N,prefix:f},fragmentShader:{log:O,prefix:m}}),a.deleteShader(A),a.deleteShader(R),this.getUniforms=function(){return void 0===C&&(C=new ni(a,T,t)),C},this.getAttributes=function(){return void 0===L&&(L=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(a,T)),L},this.destroy=function(){a.deleteProgram(T),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ii++,this.code=n,this.usedTimes=1,this.program=T,this.vertexShader=A,this.fragmentShader=R,this}function di(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Ie,n===Ie&&e&&(n=Fe),n}this.getParameters=function(e,r,o,s,c,u,l){var h=i[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(l):0,d=n.precision;null!==e.precision&&(d=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:n.vertexTextures,outputEncoding:a(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===wt||e.envMap.mapping===Et),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===S,flipSided:e.side===M,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(n,i,o,a){for(var s,c=0,u=r.length;c<u;c++){var l=r[c];if(l.code===a){++(s=l).usedTimes;break}}return void 0===s&&(s=new pi(t,e,a,n,i,o),r.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function fi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function mi(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function vi(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(fi),r.length>1&&r.sort(mi)}}},t[r]=i),i},dispose:function(){t={}}}}var gi,yi,bi,_i,xi,wi,Ei,Ti,Mi=0;function Si(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ye,color:new gn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"SpotLight":n={position:new Ye,direction:new Ye,color:new gn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We};break;case"PointLight":n={position:new Ye,color:new gn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new We,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ye,skyColor:new gn,groundColor:new gn};break;case"RectAreaLight":n={color:new gn,position:new Ye,halfWidth:new Ye,halfHeight:new Ye}}return t[e.id]=n,n}}},e={id:Mi++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ye,r=new Xe,i=new Xe;return{setup:function(o,a,s){for(var c=0,u=0,l=0,h=0,p=0,d=0,f=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var b=o[g],_=b.color,x=b.intensity,w=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)c+=_.r*x,u+=_.g*x,l+=_.b*x;else if(b.isDirectionalLight){if((M=t.get(b)).color.copy(b.color).multiplyScalar(b.intensity),M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.shadow=b.castShadow,b.castShadow){var T=b.shadow;M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize}e.directionalShadowMap[h]=E,e.directionalShadowMatrix[h]=b.shadow.matrix,e.directional[h]=M,h++}else if(b.isSpotLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(_).multiplyScalar(x),M.distance=w,M.direction.setFromMatrixPosition(b.matrixWorld),n.setFromMatrixPosition(b.target.matrixWorld),M.direction.sub(n),M.direction.transformDirection(v),M.coneCos=Math.cos(b.angle),M.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize),e.spotShadowMap[d]=E,e.spotShadowMatrix[d]=b.shadow.matrix,e.spot[d]=M,d++;else if(b.isRectAreaLight)(M=t.get(b)).color.copy(_).multiplyScalar(x),M.position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),i.identity(),r.copy(b.matrixWorld),r.premultiply(v),i.extractRotation(r),M.halfWidth.set(.5*b.width,0,0),M.halfHeight.set(0,.5*b.height,0),M.halfWidth.applyMatrix4(i),M.halfHeight.applyMatrix4(i),e.rectArea[f]=M,f++;else if(b.isPointLight)(M=t.get(b)).position.setFromMatrixPosition(b.matrixWorld),M.position.applyMatrix4(v),M.color.copy(b.color).multiplyScalar(b.intensity),M.distance=b.distance,M.decay=0===b.distance?0:b.decay,M.shadow=b.castShadow,b.castShadow&&(T=b.shadow,M.shadowBias=T.bias,M.shadowRadius=T.radius,M.shadowMapSize=T.mapSize,M.shadowCameraNear=T.camera.near,M.shadowCameraFar=T.camera.far),e.pointShadowMap[p]=E,e.pointShadowMatrix[p]=b.shadow.matrix,e.point[p]=M,p++;else if(b.isHemisphereLight){var M;(M=t.get(b)).direction.setFromMatrixPosition(b.matrixWorld),M.direction.transformDirection(v),M.direction.normalize(),M.skyColor.copy(b.color).multiplyScalar(x),M.groundColor.copy(b.groundColor).multiplyScalar(x),e.hemi[m]=M,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=l,e.directional.length=h,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+h+","+p+","+d+","+f+","+m+","+a.length},state:e}}function Ai(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=new Si,e=[],n=[],r=[];return{init:function(){e.length=0,n.length=0,r.length=0},state:{lightsArray:e,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)},pushSprite:function(t){r.push(t)}}},t[r]=i),i},dispose:function(){t={}}}}function Ri(t){ur.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ge,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function Ci(t){ur.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ye,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Li(t,e,n){for(var r=new pn,i=new Xe,o=new We,a=new We(n,n),s=new Ye,c=new Ye,u=1,l=2,h=1+(u|l),p=new Array(h),d=new Array(h),f={},m={0:M,1:T,2:S},v=[new Ye(1,0,0),new Ye(-1,0,0),new Ye(0,0,1),new Ye(0,0,-1),new Ye(0,1,0),new Ye(0,-1,0)],g=[new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,1,0),new Ye(0,0,1),new Ye(0,0,-1)],y=[new on,new on,new on,new on,new on,new on],b=0;b!==h;++b){var _=0!=(b&u),x=0!=(b&l),E=new Ri({depthPacking:je,morphTargets:_,skinning:x});p[b]=E;var A=new Ci({morphTargets:_,skinning:x});d[b]=A}var R=this;function C(e,n,r,i,o,a){var s=e.geometry,c=null,h=p,v=e.customDepthMaterial;if(r&&(h=d,v=e.customDistanceMaterial),v)c=v;else{var g=!1;n.morphTargets&&(s&&s.isBufferGeometry?g=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(g=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var y=e.isSkinnedMesh&&n.skinning,b=0;g&&(b|=u),y&&(b|=l),c=h[b]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,x=n.uuid,w=f[_];void 0===w&&(w={},f[_]=w);var E=w[x];void 0===E&&(E=c.clone(),w[x]=E),c=E}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:m[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function L(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var l=s.groups,h=0,p=l.length;h<p;h++){var d=l[h],f=u[d.materialIndex];if(f&&f.visible){var m=C(n,f,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,d)}}else if(u.visible){m=C(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)L(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w,this.render=function(e,n,u){if(!1!==R.enabled&&(!1!==R.autoUpdate||!1!==R.needsUpdate)&&0!==e.length){var l,h=t.context,p=t.state;p.disable(h.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var d=0,f=e.length;d<f;d++){var m=e[d],b=m.shadow,_=m&&m.isPointLight;if(void 0!==b){var x=b.camera;if(o.copy(b.mapSize),o.min(a),_){var w=o.x,E=o.y;y[0].set(2*w,E,w,E),y[1].set(0,E,w,E),y[2].set(3*w,E,w,E),y[3].set(w,E,w,E),y[4].set(3*w,0,w,E),y[5].set(w,0,w,E),o.x*=4,o.y*=2}if(null===b.map){var T={minFilter:At,magFilter:At,format:qt};b.map=new an(o.x,o.y,T),b.map.texture.name=m.name+".shadowMap",x.updateProjectionMatrix()}b.isSpotLightShadow&&b.update(m);var M=b.map,S=b.matrix;c.setFromMatrixPosition(m.matrixWorld),x.position.copy(c),_?(l=6,S.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(m.target.matrixWorld),x.lookAt(s),x.updateMatrixWorld(),S.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),S.multiply(x.projectionMatrix),S.multiply(x.matrixWorldInverse)),t.setRenderTarget(M),t.clear();for(var A=0;A<l;A++){if(_){s.copy(x.position),s.add(v[A]),x.up.copy(g[A]),x.lookAt(s),x.updateMatrixWorld();var C=y[A];p.viewport(C)}i.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse),r.setFromMatrix(i),L(n,u,x,_)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}R.needsUpdate=!1}}}function Pi(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ni(t,e,n,r,i){var o,a,s,c,u,l,h=new Ye,p=new qe,d=new Ye;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);o=e.createBuffer(),a=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n,e.STATIC_DRAW),s=function(){var t=e.createProgram(),n=e.createShader(e.VERTEX_SHADER),r=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvUV = uvOffset + uv * uvScale;","\\tvec2 alignedPosition = ( position - center ) * scale;","\\tvec2 rotatedPosition;","\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\\tvec4 mvPosition;","\\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\\tmvPosition.xy += rotatedPosition;","\\tgl_Position = projectionMatrix * mvPosition;","\\tfogDepth = - mvPosition.z;","}"].join("\\n")),e.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\\tvec4 texture = texture2D( map, vUV );","\\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\\tif ( gl_FragColor.a < alphaTest ) discard;","\\tif ( fogType > 0 ) {","\\t\\tfloat fogFactor = 0.0;","\\t\\tif ( fogType == 1 ) {","\\t\\t\\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\\t\\t} else {","\\t\\t\\tconst float LOG2 = 1.442695;","\\t\\t\\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\\t\\t\\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\\t\\t}","\\t\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\\t}","}"].join("\\n")),e.compileShader(n),e.compileShader(r),e.attachShader(t,n),e.attachShader(t,r),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},u={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var h=r.getContext("2d");h.fillStyle="white",h.fillRect(0,0,8,8),l=new Pi(r)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(i,v,g){if(0!==i.length){void 0===s&&f(),n.useProgram(s),n.initAttributes(),n.enableAttribute(c.position),n.enableAttribute(c.uv),n.disableUnusedAttributes(),n.disable(e.CULL_FACE),n.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a),e.uniformMatrix4fv(u.projectionMatrix,!1,g.projectionMatrix.elements),n.activeTexture(e.TEXTURE0),e.uniform1i(u.map,0);var y=0,b=0,_=v.fog;_?(e.uniform3f(u.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(u.fogNear,_.near),e.uniform1f(u.fogFar,_.far),e.uniform1i(u.fogType,1),y=1,b=1):_.isFogExp2&&(e.uniform1f(u.fogDensity,_.density),e.uniform1i(u.fogType,2),y=2,b=2)):(e.uniform1i(u.fogType,0),y=0,b=0);for(var x=0,w=i.length;x<w;x++){(M=i[x]).modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,M.matrixWorld),M.z=-M.modelViewMatrix.elements[14]}i.sort(m);var E=[],T=[];for(x=0,w=i.length;x<w;x++){var M,S=(M=i[x]).material;if(!1!==S.visible){M.onBeforeRender(t,v,g,void 0,S,void 0),e.uniform1f(u.alphaTest,S.alphaTest),e.uniformMatrix4fv(u.modelViewMatrix,!1,M.modelViewMatrix.elements),M.matrixWorld.decompose(h,p,d),E[0]=d.x,E[1]=d.y,T[0]=M.center.x-.5,T[1]=M.center.y-.5;var A=0;v.fog&&S.fog&&(A=b),y!==A&&(e.uniform1i(u.fogType,A),y=A),null!==S.map?(e.uniform2f(u.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(u.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(u.uvOffset,0,0),e.uniform2f(u.uvScale,1,1)),e.uniform1f(u.opacity,S.opacity),e.uniform3f(u.color,S.color.r,S.color.g,S.color.b),e.uniform1f(u.rotation,S.rotation),e.uniform2fv(u.center,T),e.uniform2fv(u.scale,E),n.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),n.buffers.depth.setTest(S.depthTest),n.buffers.depth.setMask(S.depthWrite),n.buffers.color.setMask(S.colorWrite),r.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),M.onAfterRender(t,v,g,void 0,S,void 0)}}n.enable(e.CULL_FACE),n.reset()}}}function Oi(t,e,n,r,i,o,a){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,u={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function h(t){return Ve.isPowerOfTwo(t.width)&&Ve.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&t.minFilter!==At&&t.minFilter!==Lt}function d(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(e){return e===At||e===Rt||e===Ct?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete u[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,f){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;u[e]!==n&&(u[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==g.complete)return void function(e,r,u){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+u),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var f=l(r.image,i.maxTextureSize);(function(t){return t.wrapS!==Mt||t.wrapT!==Mt||t.minFilter!==At&&t.minFilter!==Lt})(r)&&!1===h(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ve.floorPowerOfTwo(t.width),s.height=Ve.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=h(f),g=o.convert(r.format),b=o.convert(r.type);y(t.TEXTURE_2D,r,v);var _,x=r.mipmaps;if(r.isDepthTexture){var w=t.DEPTH_COMPONENT;if(r.type===Bt){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");w=t.DEPTH_COMPONENT32F}else c&&(w=t.DEPTH_COMPONENT16);r.format===Kt&&w===t.DEPTH_COMPONENT&&r.type!==Ft&&r.type!==Ht&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ft,b=o.convert(r.type)),r.format===Qt&&(w=t.DEPTH_STENCIL,r.type!==Vt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Vt,b=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,w,f.width,f.height,0,g,b,null)}else if(r.isDataTexture)if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,f.width,f.height,0,g,b,f.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,T=x.length;E<T;E++)_=x[E],r.format!==qt&&r.format!==Xt?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,_.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,E,g,_.width,_.height,0,g,b,_.data);e.__maxMipLevel=x.length-1}else if(x.length>0&&v){for(var E=0,T=x.length;E<T;E++)_=x[E],n.texImage2D(t.TEXTURE_2D,E,g,g,b,_);r.generateMipmaps=!1,e.__maxMipLevel=x.length-1}else n.texImage2D(t.TEXTURE_2D,0,g,g,b,f),e.__maxMipLevel=0;p(r,v)&&d(t.TEXTURE_2D,r,f.width,f.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+f),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===Mt&&a.wrapT===Mt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,f(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==At&&a.minFilter!==Lt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Bt&&null===e.get("OES_texture_float_linear"))return;if(a.type===zt&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function b(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,c,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function x(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Kt)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Qt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var u=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,v=[],g=0;g<6;g++)v[g]=u||f?f?e.image[g].image:e.image[g]:l(e.image[g],i.maxCubemapSize);var b=v[0],_=h(b),x=o.convert(e.format),w=o.convert(e.type);for(y(t.TEXTURE_CUBE_MAP,e,_),g=0;g<6;g++)if(u)for(var E,T=v[g].mipmaps,M=0,S=T.length;M<S;M++)E=T[M],e.format!==qt&&e.format!==Xt?n.getCompressedTextureFormats().indexOf(x)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,M,x,E.width,E.height,0,x,w,E.data);else f?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,v[g].width,v[g].height,0,x,w,v[g].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,x,x,w,v[g]);c.__maxMipLevel=u?T.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,b.width,b.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)b(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),b(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&x(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(p(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),d(o,i,e.width,e.height),n.bindTexture(o,null)}}}function Ii(t,e){return{convert:function(n){var r;if(n===Tt)return t.REPEAT;if(n===Mt)return t.CLAMP_TO_EDGE;if(n===St)return t.MIRRORED_REPEAT;if(n===At)return t.NEAREST;if(n===Rt)return t.NEAREST_MIPMAP_NEAREST;if(n===Ct)return t.NEAREST_MIPMAP_LINEAR;if(n===Lt)return t.LINEAR;if(n===Pt)return t.LINEAR_MIPMAP_NEAREST;if(n===Nt)return t.LINEAR_MIPMAP_LINEAR;if(n===Ot)return t.UNSIGNED_BYTE;if(n===kt)return t.UNSIGNED_SHORT_4_4_4_4;if(n===Gt)return t.UNSIGNED_SHORT_5_5_5_1;if(n===jt)return t.UNSIGNED_SHORT_5_6_5;if(n===It)return t.BYTE;if(n===Dt)return t.SHORT;if(n===Ft)return t.UNSIGNED_SHORT;if(n===Ut)return t.INT;if(n===Ht)return t.UNSIGNED_INT;if(n===Bt)return t.FLOAT;if(n===zt&&null!==(r=e.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Wt)return t.ALPHA;if(n===Xt)return t.RGB;if(n===qt)return t.RGBA;if(n===Yt)return t.LUMINANCE;if(n===Zt)return t.LUMINANCE_ALPHA;if(n===Kt)return t.DEPTH_COMPONENT;if(n===Qt)return t.DEPTH_STENCIL;if(n===H)return t.FUNC_ADD;if(n===B)return t.FUNC_SUBTRACT;if(n===z)return t.FUNC_REVERSE_SUBTRACT;if(n===j)return t.ZERO;if(n===V)return t.ONE;if(n===W)return t.SRC_COLOR;if(n===X)return t.ONE_MINUS_SRC_COLOR;if(n===q)return t.SRC_ALPHA;if(n===Y)return t.ONE_MINUS_SRC_ALPHA;if(n===Z)return t.DST_ALPHA;if(n===J)return t.ONE_MINUS_DST_ALPHA;if(n===K)return t.DST_COLOR;if(n===Q)return t.ONE_MINUS_DST_COLOR;if(n===$)return t.SRC_ALPHA_SATURATE;if((n===$t||n===te||n===ee||n===ne)&&null!==(r=e.get("WEBGL_compressed_texture_s3tc"))){if(n===$t)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===te)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ee)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ne)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===re||n===ie||n===oe||n===ae)&&null!==(r=e.get("WEBGL_compressed_texture_pvrtc"))){if(n===re)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===ie)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===oe)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ae)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===se&&null!==(r=e.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===ce||n===ue||n===le||n===he||n===pe||n===de||n===fe||n===me||n===ve||n===ge||n===ye||n===be||n===_e||n===xe)&&null!==(r=e.get("WEBGL_compressed_texture_astc")))return n;if((n===k||n===G)&&null!==(r=e.get("EXT_blend_minmax"))){if(n===k)return r.MIN_EXT;if(n===G)return r.MAX_EXT}return n===Vt&&null!==(r=e.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}}}function Di(t,e,n,r){Ln.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Fi(t){Di.call(this),this.cameras=t||[]}function Ui(t){var e=this,n=null,r=null,i=null,o=new Xe,a=new Xe;"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",v,!1));var s=new Xe,c=new qe,u=new Ye,l=new Di;l.bounds=new on(0,0,.5,1),l.layers.enable(1);var h=new Di;h.bounds=new on(.5,0,.5,1),h.layers.enable(2);var p,d,f=new Fi([l,h]);function m(){return null!==n&&!0===n.isPresenting}function v(){if(m()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*i,o,1)}else e.enabled&&t.setDrawingBufferSize(p.width,p.height,d)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t)},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){if(null===n)return t;n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r);var p=n.stageParameters;p?o.fromArray(p.sittingToStandingTransform):o.makeTranslation(0,e.userHeight,0);var d=r.pose,m=null!==i?i:t;if(m.matrix.copy(o),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(o),u.fromArray(d.position),u.applyQuaternion(c),m.position.add(u)),m.updateMatrixWorld(),!1===n.isPresenting)return t;l.near=t.near,h.near=t.near,l.far=t.far,h.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(r.leftViewMatrix),h.matrixWorldInverse.fromArray(r.rightViewMatrix),a.getInverse(o),l.matrixWorldInverse.multiply(a),h.matrixWorldInverse.multiply(a);var v=m.parent;null!==v&&(s.getInverse(v.matrixWorld),l.matrixWorldInverse.multiply(s),h.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),h.matrixWorld.getInverse(h.matrixWorldInverse),l.projectionMatrix.fromArray(r.leftProjectionMatrix),h.projectionMatrix.fromArray(r.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var g=n.getLayers();if(g.length){var y=g[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&h.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return o},this.submitFrame=function(){m()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",v)}}function Hi(t){console.log("THREE.WebGLRenderer",d);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,i=void 0===t.depth||t.depth,o=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,u=void 0!==t.powerPreference?t.powerPreference:"default",l=null,h=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=pt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,f,y,b,_,x,w,E,T,A,R,L,P,H,B,z,k,G,j,V=this,W=!1,X=null,q=null,Y=-1,Z="",J=null,K=null,Q=new on,$=new on,ct=null,ut=0,lt=e.width,ht=e.height,dt=1,ft=new on(0,0,lt,ht),mt=new on(0,0,lt,ht),vt=!1,gt=new pn,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new hn,a=new Ze,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var l=r+4*c,h=n.matrixWorldInverse;a.getNormalMatrix(h),(null===u||u.length<l)&&(u=new Float32Array(l));for(var p=0,d=r;p!==c;++p,d+=4)o.copy(e[p]).applyMatrix4(h,a),o.normal.toArray(u,d),u[d+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,l,h,p){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var d=i?0:n,f=4*d,m=h.clippingState||null;s.value=m,m=u(t,l,f,p);for(var v=0;v!==f;++v)m[v]=e[v];h.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=d}}},bt=!1,_t=!1,xt=new Xe,wt=new Ye;function Et(){return null===X?dt:1}try{var Tt={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:u};if(e.addEventListener("webglcontextlost",Rt,!1),e.addEventListener("webglcontextrestored",Ct,!1),null===(p=n||e.getContext("webgl",Tt)||e.getContext("experimental-webgl",Tt)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Mt(){(f=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=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":r=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":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(p)).get("WEBGL_depth_texture"),f.get("OES_texture_float"),f.get("OES_texture_float_linear"),f.get("OES_texture_half_float"),f.get("OES_texture_half_float_linear"),f.get("OES_standard_derivatives"),f.get("OES_element_index_uint"),f.get("ANGLE_instanced_arrays"),j=new Ii(p,f),y=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=void 0!==n.precision?n.precision:"highp",a=i(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var s=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,g=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:u,maxTextureSize:l,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:g,floatVertexTextures:v&&g}}(p,f,t),(b=new function(t,e,n){var r=new function(){var e=!1,n=new on,r=null,i=new on(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},i=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?q(t.DEPTH_TEST):Y(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case tt:t.depthFunc(t.NEVER);break;case et:t.depthFunc(t.ALWAYS);break;case nt:t.depthFunc(t.LESS);break;case rt:t.depthFunc(t.LEQUAL);break;case it:t.depthFunc(t.EQUAL);break;case ot:t.depthFunc(t.GEQUAL);break;case at:t.depthFunc(t.GREATER);break;case st:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},o=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?q(t.STENCIL_TEST):Y(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},a=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(a),c=new Uint8Array(a),u=new Uint8Array(a),l={},h=null,p=null,d=null,f=null,y=null,b=null,_=null,x=null,w=null,E=!1,T=null,A=null,R=null,C=null,L=null,P=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),H=!1,B=0,z=t.getParameter(t.VERSION);-1!==z.indexOf("WebGL")?(B=parseFloat(/^WebGL\\ ([0-9])/.exec(z)[1]),H=B>=1):-1!==z.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\\ ES\\ ([0-9])/.exec(z)[1]),H=B>=2);var k=null,G={},j=new on,V=new on;function W(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var X={};function q(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function Y(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function Z(e,r,i,o,a,s,c,u){if(e!==N?q(t.BLEND):Y(t.BLEND),e!==U){if(e!==d||u!==E)switch(e){case I:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case D:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case F:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:u?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,y=null,b=null,_=null,x=null,w=null}else a=a||r,s=s||i,c=c||o,r===f&&a===_||(t.blendEquationSeparate(n.convert(r),n.convert(a)),f=r,_=a),i===y&&o===b&&s===x&&c===w||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),y=i,b=o,x=s,w=c);d=e,E=u}function J(e){T!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),T=e)}function K(e){e!==m?(q(t.CULL_FACE),e!==A&&(e===v?t.cullFace(t.BACK):e===g?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):Y(t.CULL_FACE),A=e}function Q(e,n,r){e?(q(t.POLYGON_OFFSET_FILL),C===n&&L===r||(t.polygonOffset(n,r),C=n,L=r)):Y(t.POLYGON_OFFSET_FILL)}function $(e){void 0===e&&(e=t.TEXTURE0+P-1),k!==e&&(t.activeTexture(e),k=e)}return X[t.TEXTURE_2D]=W(t.TEXTURE_2D,t.TEXTURE_2D,1),X[t.TEXTURE_CUBE_MAP]=W(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),r.setClear(0,0,0,1),i.setClear(1),o.setClear(0),q(t.DEPTH_TEST),i.setFunc(rt),J(!1),K(v),q(t.CULL_FACE),q(t.BLEND),Z(O),{buffers:{color:r,depth:i,stencil:o},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(n){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),0!==u[n]&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),u[n]=0)},enableAttributeAndDivisor:function(n,r){s[n]=1,0===c[n]&&(t.enableVertexAttribArray(n),c[n]=1),u[n]!==r&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),u[n]=r)},disableUnusedAttributes:function(){for(var e=0,n=c.length;e!==n;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:q,disable:Y,getCompressedTextureFormats:function(){if(null===h&&(h=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)h.push(n[r]);return h},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:Z,setMaterial:function(e,n){e.side===S?Y(t.CULL_FACE):q(t.CULL_FACE);var o=e.side===M;n&&(o=!o),J(o),!0===e.transparent?Z(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):Z(N),i.setFunc(e.depthFunc),i.setTest(e.depthTest),i.setMask(e.depthWrite),r.setMask(e.colorWrite),Q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:J,setCullFace:K,setLineWidth:function(e){e!==R&&(H&&t.lineWidth(e),R=e)},setPolygonOffset:Q,setScissorTest:function(e){e?q(t.SCISSOR_TEST):Y(t.SCISSOR_TEST)},activeTexture:$,bindTexture:function(e,n){null===k&&$();var r=G[k];void 0===r&&(r={type:void 0,texture:void 0},G[k]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||X[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===j.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),j.copy(e))},viewport:function(e){!1===V.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),V.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},h=null,k=null,G={},p=null,d=null,T=null,A=null,r.reset(),i.reset(),o.reset()}}}(p,f,j)).scissor($.copy(mt).multiplyScalar(dt)),b.viewport(Q.copy(ft).multiplyScalar(dt)),_=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(p),x=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},w=new Oi(p,f,b,x,y,j,_),E=new xn(p),T=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[a.id];u&&(e.remove(u),delete i[a.id]),(u=i[s.id])&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Jn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,l=(o=s.array).length;u<l;u+=3){var h=o[u+0],p=o[u+1],d=o[u+2];a.push(h,p,p,d,d,h)}else for(u=0,l=(o=c.position.array).length/3-1;u<l;u+=3)h=u+0,p=u+1,d=u+2,a.push(h,p,p,d,d,h);return r=new(Yn(a)>65535?Vn:Gn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(p,E,_),A=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(T,_),B=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var l=0;l<c;l++)u[l]=[l,0];e[i.id]=u}var h=o.morphTargets&&i.morphAttributes.position,p=o.morphNormals&&i.morphAttributes.normal;for(l=0;l<c;l++)0!==(d=u[l])[1]&&(h&&i.removeAttribute("morphTarget"+l),p&&i.removeAttribute("morphNormal"+l));for(l=0;l<c;l++)(d=u[l])[0]=l,d[1]=s[l];for(u.sort(vr),l=0;l<8;l++){var d;if(d=u[l]){var f=d[0],m=d[1];if(m){h&&i.addAttribute("morphTarget"+l,h[f]),p&&i.addAttribute("morphNormal"+l,p[f]),n[l]=m;continue}}n[l]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(p),R=new di(V,f,y),L=new vi,P=new Ai,H=new function(t,e,n,r){var i,o,a,s=new gn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,l,h){var p=r.background;null===p?u(s,c):p&&p.isColor&&(u(p,1),h=!0),(t.autoClear||h)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===a&&((a=new mr(new Qn(1,1,1),new hr({uniforms:_n.cube.uniforms,vertexShader:_n.cube.vertexShader,fragmentShader:_n.cube.fragmentShader,side:M,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a.geometry)),a.material.uniforms.tCube.value=p,e.push(a,a.geometry,a.material,0,null)):p&&p.isTexture&&(void 0===i&&(i=new Pn(-1,1,1,-1,0,1),o=new mr(new tr(2,2),new lr({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o.geometry)),o.material.map=p,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(V,b,T,s),z=new function(t,e,n){var r;this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r)},this.renderInstances=function(t,i,o){var a=e.get("ANGLE_instanced_arrays");if(null!==a){var s=t.attributes.position;s.isInterleavedBufferAttribute?(o=s.data.count,a.drawArraysInstancedANGLE(r,0,o,t.maxInstancedCount)):a.drawArraysInstancedANGLE(r,i,o,t.maxInstancedCount),n.update(o,r,t.maxInstancedCount)}else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),k=new function(t,e,n){var r,i,o;this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,a){t.drawElements(r,a,i,e*o),n.update(a,r)},this.renderInstances=function(t,a,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(r,s,i,a*o,t.maxInstancedCount),n.update(s,r,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}(p,f,_),G=new Ni(V,p,b,w,y),_.programs=R.programs,V.context=p,V.capabilities=y,V.extensions=f,V.properties=x,V.renderLists=L,V.state=b,V.info=_}Mt();var St=new Ui(V);this.vr=St;var At=new Li(V,A,y.maxTextureSize);function Rt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),W=!0}function Ct(){console.log("THREE.WebGLRenderer: Context Restored."),W=!1,Mt()}function Lt(t){var e=t.target;e.removeEventListener("dispose",Lt),function(t){Pt(t),x.remove(t)}(e)}function Pt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&R.releaseProgram(e)}this.shadowMap=At,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=f.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=f.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return dt},this.setPixelRatio=function(t){void 0!==t&&(dt=t,this.setSize(lt,ht,!1))},this.getSize=function(){return{width:lt,height:ht}},this.setSize=function(t,n,r){var i=St.getDevice();i&&i.isPresenting?console.warn("THREE.WebGLRenderer: Can\'t change size while VR device is presenting."):(lt=t,ht=n,e.width=t*dt,e.height=n*dt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*dt,height:ht*dt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ht=n,dt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,n,r){ft.set(t,ht-e-r,n,r),b.viewport(Q.copy(ft).multiplyScalar(dt))},this.setScissor=function(t,e,n,r){mt.set(t,ht-e-r,n,r),b.scissor($.copy(mt).multiplyScalar(dt))},this.setScissorTest=function(t){b.setScissorTest(vt=t)},this.getClearColor=function(){return H.getClearColor()},this.setClearColor=function(){H.setClearColor.apply(H,arguments)},this.getClearAlpha=function(){return H.getClearAlpha()},this.setClearAlpha=function(){H.setClearAlpha.apply(H,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=p.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=p.STENCIL_BUFFER_BIT),p.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Rt,!1),e.removeEventListener("webglcontextrestored",Ct,!1),L.dispose(),P.dispose(),x.dispose(),A.dispose(),St.dispose(),Ft()},this.renderBufferImmediate=function(t,e,n){b.initAttributes();var r=x.get(t);t.hasPositions&&!r.position&&(r.position=p.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=p.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=p.createBuffer()),t.hasColors&&!r.color&&(r.color=p.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,r.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),b.enableAttribute(i.position),p.vertexAttribPointer(i.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,c=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=c,s[o+1]=u,s[o+2]=l,s[o+3]=c,s[o+4]=u,s[o+5]=l,s[o+6]=c,s[o+7]=u,s[o+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),b.enableAttribute(i.normal),p.vertexAttribPointer(i.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(p.bindBuffer(p.ARRAY_BUFFER,r.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),b.enableAttribute(i.uv),p.vertexAttribPointer(i.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==C&&(p.bindBuffer(p.ARRAY_BUFFER,r.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),b.enableAttribute(i.color),p.vertexAttribPointer(i.color,3,p.FLOAT,!1,0,0)),b.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.matrixWorld.determinant()<0;b.setMaterial(r,a);var s=Vt(t,e,r,i),c=n.id+"_"+s.id+"_"+(!0===r.wireframe),u=!1;c!==Z&&(Z=c,u=!0),i.morphTargetInfluences&&(B.update(i,n,r,s),u=!0);var l,h=n.index,d=n.attributes.position,m=1;!0===r.wireframe&&(h=T.getWireframeAttribute(n),m=2);var v=z;null!==h&&(l=E.get(h),(v=k).setIndex(l)),u&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&&null===f.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,l=c.itemSize,h=E.get(c);if(void 0===h)continue;var d=h.buffer,m=h.type,v=h.bytesPerElement;if(c.isInterleavedBufferAttribute){var g=c.data,y=g.stride,_=c.offset;g&&g.isInstancedInterleavedBuffer?(b.enableAttributeAndDivisor(s,g.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=g.meshPerAttribute*g.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,y*v,_*v)}else c.isInstancedBufferAttribute?(b.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):b.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,d),p.vertexAttribPointer(s,l,m,u,0,0)}else if(void 0!==o){var x=o[a];if(void 0!==x)switch(x.length){case 2:p.vertexAttrib2fv(s,x);break;case 3:p.vertexAttrib3fv(s,x);break;case 4:p.vertexAttrib4fv(s,x);break;default:p.vertexAttrib1fv(s,x)}}}}b.disableUnusedAttributes()}(r,s,n),null!==h&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var y=n.drawRange.start*m,_=n.drawRange.count*m,x=null!==o?o.start*m:0,w=null!==o?o.count*m:1/0,M=Math.max(y,x),S=Math.min(g,y+_,x+w)-1,A=Math.max(0,S-M+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)b.setLineWidth(r.wireframeLinewidth*Et()),v.setMode(p.LINES);else switch(i.drawMode){case Pe:v.setMode(p.TRIANGLES);break;case Ne:v.setMode(p.TRIANGLE_STRIP);break;case Oe:v.setMode(p.TRIANGLE_FAN)}else if(i.isLine){var R=r.linewidth;void 0===R&&(R=1),b.setLineWidth(R*Et()),i.isLineSegments?v.setMode(p.LINES):i.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else i.isPoints&&v.setMode(p.POINTS);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&v.renderInstances(n,M,A):v.render(M,A)}},this.compile=function(t,e){(h=P.get(t,e)).init(),t.traverse(function(t){t.isLight&&(h.pushLight(t),t.castShadow&&h.pushShadow(t))}),h.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)jt(e.material[n],t.fog,e);else jt(e.material,t.fog,e)})};var Nt,It=!1,Dt=null;function Ft(){It=!1}function Ut(){var t=St.getDevice();t&&t.isPresenting?t.requestAnimationFrame(Ht):window.requestAnimationFrame(Ht)}function Ht(t){!1!==It&&(Dt(t),Ut())}function kt(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,l=a.group;if(n.isArrayCamera){K=n;for(var h=n.cameras,p=0,d=h.length;p<d;p++){var f=h[p];if(s.layers.test(f.layers)){var m=f.bounds,v=m.x*lt,g=m.y*ht,y=m.z*lt,_=m.w*ht;b.viewport(Q.set(v,g,y,_).multiplyScalar(dt)),Gt(s,e,f,c,u,l)}}}else K=null,Gt(s,e,n,c,u,l)}}function Gt(t,e,n,r,i,o){if(t.onBeforeRender(V,e,n,r,i,o),h=P.get(e,K||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var a=t.isMesh&&t.matrixWorld.determinant()<0;b.setMaterial(i,a);var s=Vt(n,e.fog,i,t);Z="",function(t,e,n){t.render(function(t){V.renderBufferImmediate(t,e,n)})}(t,s,i)}else V.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(V,e,n,r,i,o),h=P.get(e,K||n)}function jt(t,e,n){var r=x.get(t),i=h.state.lights,o=h.state.shadowsArray,a=R.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),s=R.getProgramCode(t,a),c=r.program,u=!0;if(void 0===c)t.addEventListener("dispose",Lt);else if(c.code!==s)Pt(t);else if(r.lightsHash!==i.state.hash)x.update(t,"lightsHash",i.state.hash),u=!1;else{if(void 0!==a.shaderID)return;u=!1}if(u){if(a.shaderID){var l=_n[a.shaderID];r.shader={name:t.type,uniforms:mn.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,V),c=R.acquireProgram(t,r.shader,a,s),r.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<V.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<V.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,f.clippingPlanes=yt.uniform),r.fog=e,r.lightsHash=i.state.hash,t.lights&&(f.ambientLightColor.value=i.state.ambient,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=r.program.getUniforms(),v=ni.seqWithValue(m.seq,f);r.uniformsList=v}function Vt(t,e,n,r){ut=0;var i=x.get(n),o=h.state.lights;if(bt&&(_t||t!==J)){var a=t===J&&n.id===Y;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(jt(n,e,r),n.needsUpdate=!1);var s,c,u=!1,l=!1,d=!1,f=i.program,m=f.getUniforms(),v=i.shader.uniforms;if(b.useProgram(f.program)&&(u=!0,l=!0,d=!0),n.id!==Y&&(Y=n.id,l=!0),u||t!==J){if(m.setValue(p,"projectionMatrix",t.projectionMatrix),y.logarithmicDepthBuffer&&m.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),J!==(K||t)&&(J=K||t,l=!0,d=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=m.map.cameraPosition;void 0!==g&&g.setValue(p,wt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&m.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){m.setOptional(p,r,"bindMatrix"),m.setOptional(p,r,"bindMatrixInverse");var _=r.skeleton;if(_){var w=_.bones;if(y.floatVertexTextures){if(void 0===_.boneTexture){var E=Math.sqrt(4*w.length);E=Ve.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(_.boneMatrices);var M=new cn(T,E,E,qt,Bt);M.needsUpdate=!0,_.boneMatrices=T,_.boneTexture=M,_.boneTextureSize=E}m.setValue(p,"boneTexture",_.boneTexture),m.setValue(p,"boneTextureSize",_.boneTextureSize)}else m.setOptional(p,_,"boneMatrices")}}return l&&(m.setValue(p,"toneMappingExposure",V.toneMappingExposure),m.setValue(p,"toneMappingWhitePoint",V.toneMappingWhitePoint),n.lights&&(c=d,(s=v).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(v,e),n.isMeshBasicMaterial?Wt(v,n):n.isMeshLambertMaterial?(Wt(v,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(v,n)):n.isMeshPhongMaterial?(Wt(v,n),n.isMeshToonMaterial?function(t,e){Xt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(v,n):Xt(v,n)):n.isMeshStandardMaterial?(Wt(v,n),n.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Yt(t,e)}(v,n):Yt(v,n)):n.isMeshDepthMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isMeshDistanceMaterial?(Wt(v,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(v,n)):n.isMeshNormalMaterial?(Wt(v,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale);e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale));e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(v,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(v,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(v,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*ht,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(v,n):n.isShadowMaterial&&(v.color.value=n.color,v.opacity.value=n.opacity),void 0!==v.ltc_1&&(v.ltc_1.value=bn.LTC_1),void 0!==v.ltc_2&&(v.ltc_2.value=bn.LTC_2),ni.upload(p,i.uniformsList,v,V)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(ni.upload(p,i.uniformsList,v,V),n.uniformsNeedUpdate=!1),m.setValue(p,"modelViewMatrix",r.modelViewMatrix),m.setValue(p,"normalMatrix",r.normalMatrix),m.setValue(p,"modelMatrix",r.matrixWorld),f}function Wt(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function Xt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Yt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}this.animate=function(t){null!==(Dt=t)?It||(Ut(),It=!0):Ft()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!W){Z="",Y=-1,J=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),St.enabled&&(e=St.getCamera(e)),(h=P.get(t,e)).init(),t.onBeforeRender(V,t,e,n),xt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(xt),_t=this.localClippingEnabled,bt=yt.init(this.clippingPlanes,_t,e),(l=L.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!gt.intersectsSprite(e)||h.pushSprite(e);else if(e.isImmediateRenderObject)r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt),l.push(e,null,e.material,wt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&wt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(xt);var o=A.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var p=s[c],d=a[p.materialIndex];d&&d.visible&&l.push(e,o,d,wt.z,p)}else a.visible&&l.push(e,o,a,wt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,V.sortObjects),!0===V.sortObjects&&l.sort(),bt&&yt.beginShadows();var i=h.state.shadowsArray;At.render(i,t,e),h.setupLights(e),bt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),H.render(l,t,e,r);var o=l.opaque,a=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&kt(o,t,e,s),a.length&&kt(a,t,e,s)}else o.length&&kt(o,t,e),a.length&&kt(a,t,e);var c=h.state.spritesArray;G.render(c,t,e),n&&w.updateRenderTargetMipmap(n),b.buffers.depth.setTest(!0),b.buffers.depth.setMask(!0),b.buffers.color.setMask(!0),b.setPolygonOffset(!1),t.onAfterRender(V,t,e),St.enabled&&St.submitFrame(),l=null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ut;return t>=y.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+y.maxTextures),ut+=1,t},this.setTexture2D=(Nt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Nt||(console.warn("THREE.WebGLRenderer.setTexture2D: don\'t use render targets as textures. Use their .texture property instead."),Nt=!0),t=t.texture),w.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),w.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don\'t use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?w.setTextureCube(e,n):w.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return X},this.setRenderTarget=function(t){X=t,t&&void 0===x.get(t).__webglFramebuffer&&w.setupRenderTarget(t);var e=null,n=!1;if(t){var r=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,Q.copy(t.viewport),$.copy(t.scissor),ct=t.scissorTest}else Q.copy(ft).multiplyScalar(dt),$.copy(mt).multiplyScalar(dt),ct=vt;if(q!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),q=e),b.viewport(Q),b.scissor($),b.setScissorTest(ct),n){var i=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=x.get(t).__webglFramebuffer;if(a){var s=!1;a!==q&&(p.bindFramebuffer(p.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,l=c.type;if(u!==qt&&j.convert(u)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Ot||j.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||l===Bt&&(f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||l===zt&&f.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&p.readPixels(e,n,r,i,j.convert(u),j.convert(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,q)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=j.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=j.convert(n.format),s=j.convert(n.type),c=e.isDataTexture?e.image.data:e.image;this.setTexture2D(n,0),p.texSubImage2D(p.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,c)}}function Bi(t,e){this.name="",this.color=new gn(t),this.density=void 0!==e?e:25e-5}function zi(t,e,n){this.name="",this.color=new gn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ki(){Cn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Gi(t){ur.call(this),this.type="SpriteMaterial",this.color=new gn(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function ji(t){Cn.call(this),this.type="Sprite",this.material=void 0!==t?t:new Gi,this.center=new We(.5,.5)}function Vi(){Cn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Wi(t,e){if(t=t||[],this.bones=t.slice(0),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{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new Xe)}}function Xi(){Cn.call(this),this.type="Bone"}function qi(t,e){mr.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Xe,this.bindMatrixInverse=new Xe;var n=new Wi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function Yi(t){ur.call(this),this.type="LineBasicMaterial",this.color=new gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Zi(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Ji(t,e);Cn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Yi({color:16777215*Math.random()})}function Ji(t,e){Zi.call(this,t,e),this.type="LineSegments"}function Ki(t,e){Zi.call(this,t,e),this.type="LineLoop"}function Qi(t){ur.call(this),this.type="PointsMaterial",this.color=new gn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function $i(t,e){Cn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Jn,this.material=void 0!==e?e:new Qi({color:16777215*Math.random()})}function to(){Cn.call(this),this.type="Group"}function eo(t,e,n,r,i,o,a,s,c){rn.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function no(t,e,n,r,i,o,a,s,c,u,l,h){rn.call(this,null,o,a,s,c,u,r,i,l,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function ro(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Kt)!==Kt&&u!==Qt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Kt&&(n=Ft),void 0===n&&u===Qt&&(n=Vt),rn.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:At,this.minFilter=void 0!==s?s:At,this.flipY=!1,this.generateMipmaps=!1}function io(t){Jn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,l,h=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[f[n]],c=v[f[(n+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]})}for(u in d)a=d[u],l=t.vertices[a.index1],h.push(l.x,l.y,l.z),l=t.vertices[a.index2],h.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var g,y,b,_,x,w,E;if(l=new Ye,null!==t.index){for(g=t.attributes.position,y=t.index,0===(b=t.groups).length&&(b=[{start:0,count:y.count,materialIndex:0}]),i=0,o=b.length;i<o;++i)for(e=x=(_=b[i]).start,r=x+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[u=p[0]+","+p[1]]&&(d[u]={index1:p[0],index2:p[1]});for(u in d)a=d[u],l.fromBufferAttribute(g,a.index1),h.push(l.x,l.y,l.z),l.fromBufferAttribute(g,a.index2),h.push(l.x,l.y,l.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)w=3*e+n,l.fromBufferAttribute(g,w),h.push(l.x,l.y,l.z),E=3*e+(n+1)%3,l.fromBufferAttribute(g,E),h.push(l.x,l.y,l.z)}this.addAttribute("position",new Wn(h,3))}function oo(t,e,n){Fn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new ao(t,e,n)),this.mergeVertices()}function ao(t,e,n){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=new Ye,f=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,l),a.push(l.x,l.y,l.z),v-1e-5>=0?(t(v-1e-5,m,h),p.subVectors(l,h)):(t(v+1e-5,m,h),p.subVectors(h,l)),m-1e-5>=0?(t(v,m-1e-5,h),d.subVectors(l,h)):(t(v,m+1e-5,h),d.subVectors(h,l)),u.crossVectors(p,d).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*f+i,y=r*f+i+1,b=(r+1)*f+i+1,_=(r+1)*f+i;o.push(g,y,_),o.push(y,b,_)}this.setIndex(o),this.addAttribute("position",new Wn(a,3)),this.addAttribute("normal",new Wn(s,3)),this.addAttribute("uv",new Wn(c,2))}function so(t,e,n,r){Fn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new co(t,e,n,r)),this.mergeVertices()}function co(t,e,n,r){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var p=Math.floor(o/2);o%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}!function(t){for(var n=new Ye,r=new Ye,i=new Ye,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ye,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ye,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=l(t)/2/Math.PI+.5,r=(a=t,Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5);o.push(n,1-r)}var a;(function(){for(var t=new Ye,e=new Ye,n=new Ye,r=new Ye,a=new We,s=new We,c=new We,h=0,p=0;h<i.length;h+=9,p+=6){t.set(i[h+0],i[h+1],i[h+2]),e.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),a.set(o[p+0],o[p+1]),s.set(o[p+2],o[p+3]),c.set(o[p+4],o[p+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=l(r);u(a,p+0,t,d),u(s,p+2,e,d),u(c,p+4,n,d)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Wn(i,3)),this.addAttribute("normal",new Wn(i.slice(),3)),this.addAttribute("uv",new Wn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function uo(t,e){Fn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lo(t,e)),this.mergeVertices()}function lo(t,e){co.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="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ho(t,e){Fn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new po(t,e)),this.mergeVertices()}function po(t,e){co.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="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function fo(t,e){Fn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new mo(t,e)),this.mergeVertices()}function mo(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];co.call(this,r,[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="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function vo(t,e){Fn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new go(t,e)),this.mergeVertices()}function go(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];co.call(this,i,[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),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function yo(t,e,n,r,i,o){Fn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new bo(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function bo(t,e,n,r,i){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ye,u=new Ye,l=new We,h=new Ye,p=[],d=[],f=[],m=[];function v(i){h=t.getPointAt(i/e,h);var a=o.normals[i],l=o.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);u.x=v*a.x+m*l.x,u.y=v*a.y+m*l.y,u.z=v*a.z+m*l.z,u.normalize(),d.push(u.x,u.y,u.z),c.x=h.x+n*u.x,c.y=h.y+n*u.y,c.z=h.z+n*u.z,p.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)l.x=a/e,l.y=s/r,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Wn(p,3)),this.addAttribute("normal",new Wn(d,3)),this.addAttribute("uv",new Wn(f,2))}function _o(t,e,n,r,i,o,a){Fn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new xo(t,e,n,r,i,o)),this.mergeVertices()}function xo(t,e,n,r,i,o){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],l=[],h=[],p=new Ye,d=new Ye,f=new Ye,m=new Ye,v=new Ye,g=new Ye,y=new Ye;for(a=0;a<=n;++a){var b=a/n*i*Math.PI*2;for(A(b,i,o,t,f),A(b+.01,i,o,t,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,x=-e*Math.cos(_),w=e*Math.sin(_);p.x=f.x+(x*y.x+w*v.x),p.y=f.y+(x*y.y+w*v.y),p.z=f.z+(x*y.z+w*v.z),u.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),h.push(a/n),h.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var E=(r+1)*(s-1)+(a-1),T=(r+1)*s+(a-1),M=(r+1)*s+a,S=(r+1)*(s-1)+a;c.push(E,T,S),c.push(T,M,S)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Wn(u,3)),this.addAttribute("normal",new Wn(l,3)),this.addAttribute("uv",new Wn(h,2))}function wo(t,e,n,r,i){Fn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Eo(t,e,n,r,i)),this.mergeVertices()}function Eo(t,e,n,r,i){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],l=[],h=new Ye,p=new Ye,d=new Ye;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var f=a/r*i,m=o/n*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),h.x=t*Math.cos(f),h.y=t*Math.sin(f),d.subVectors(p,h).normalize(),u.push(d.x,d.y,d.z),l.push(a/r),l.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,b=(r+1)*o+a;s.push(v,g,b),s.push(g,y,b)}this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("normal",new Wn(u,3)),this.addAttribute("uv",new Wn(l,2))}Ri.prototype=Object.create(ur.prototype),Ri.prototype.constructor=Ri,Ri.prototype.isMeshDepthMaterial=!0,Ri.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Ci.prototype=Object.create(ur.prototype),Ci.prototype.constructor=Ci,Ci.prototype.isMeshDistanceMaterial=!0,Ci.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},Pi.prototype=Object.create(rn.prototype),Pi.prototype.constructor=Pi,Di.prototype=Object.assign(Object.create(Ln.prototype),{constructor:Di,isPerspectiveCamera:!0,copy:function(t,e){return Ln.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ve.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ve.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ve.RAD2DEG*Math.atan(Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ve.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Fi.prototype=Object.assign(Object.create(Di.prototype),{constructor:Fi,isArrayCamera:!0}),Bi.prototype.isFogExp2=!0,Bi.prototype.clone=function(){return new Bi(this.color.getHex(),this.density)},Bi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},zi.prototype.isFog=!0,zi.prototype.clone=function(){return new zi(this.color.getHex(),this.near,this.far)},zi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ki.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ki,copy:function(t,e){return Cn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Gi.prototype=Object.create(ur.prototype),Gi.prototype.constructor=Gi,Gi.prototype.isSpriteMaterial=!0,Gi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},ji.prototype=Object.assign(Object.create(Cn.prototype),{constructor:ji,isSprite:!0,raycast:(gi=new Ye,yi=new Ye,bi=new Ye,function(t,e){yi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(yi,gi),bi.setFromMatrixScale(this.matrixWorld);var n=bi.x*bi.y/4;if(!(yi.distanceToSquared(gi)>n)){var r=t.ray.origin.distanceTo(gi);r<t.near||r>t.far||e.push({distance:r,point:gi.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return Cn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Vi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Vi,copy:function(t){Cn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:(_i=new Ye,function(t,e){_i.setFromMatrixPosition(this.matrixWorld);var n=t.ray.origin.distanceTo(_i);this.getObjectForDistance(n).raycast(t,e)}),update:function(){var t=new Ye,e=new Ye;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Wi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new Xe;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(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))},update:(xi=new Xe,wi=new Xe,function(){for(var t=this.bones,e=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=t.length;i<o;i++){var a=t[i]?t[i].matrixWorld:wi;xi.multiplyMatrices(a,e[i]),xi.toArray(n,16*i)}void 0!==r&&(r.needsUpdate=!0)}),clone:function(){return new Wi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),Xi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Xi,isBone:!0}),qi.prototype=Object.assign(Object.create(mr.prototype),{constructor:qi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Xi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new on,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){mr.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Yi.prototype=Object.create(ur.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isLineBasicMaterial=!0,Yi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Zi.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Zi,isLine:!0,computeLineDistances:(Ei=new Ye,Ti=new Ye,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,n=[0],r=1,i=e.count;r<i;r++)Ei.fromBufferAttribute(e,r-1),Ti.fromBufferAttribute(e,r),n[r]=n[r-1],n[r]+=Ei.distanceTo(Ti);t.addAttribute("lineDistance",new Wn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var o=t.vertices;for((n=t.lineDistances)[0]=0,r=1,i=o.length;r<i;r++)n[r]=n[r-1],n[r]+=o[r-1].distanceTo(o[r])}return this}),raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(c),!1!==r.ray.intersectsSphere(n)){t.getInverse(c),e.copy(r.ray).applyMatrix4(t);var u=new Ye,l=new Ye,h=new Ye,p=new Ye,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var v=f.array,g=0,y=v.length-1;g<y;g+=d){var b=v[g],_=v[g+1];if(u.fromArray(m,3*b),l.fromArray(m,3*_),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}else for(g=0,y=m.length/3-1;g<y;g+=d){if(u.fromArray(m,3*g),l.fromArray(m,3*g+3),!(e.distanceSqToSegment(u,l,p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var x=s.vertices,w=x.length;for(g=0;g<w-1;g+=d){var E;if(!(e.distanceSqToSegment(x[g],x[g+1],p,h)>a))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ji.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ji,isLineSegments:!0,computeLineDistances:function(){var t=new Ye,e=new Ye;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Wn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),Ki.prototype=Object.assign(Object.create(Zi.prototype),{constructor:Ki,isLineLoop:!0}),Qi.prototype=Object.create(ur.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isPointsMaterial=!0,Qi.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},$i.prototype=Object.assign(Object.create(Cn.prototype),{constructor:$i,isPoints:!0,raycast:function(){var t=new Xe,e=new pr,n=new ln;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=u*u,h=new Ye,p=new Ye;if(a.isBufferGeometry){var d=a.index,f=a.attributes.position.array;if(null!==d)for(var m=d.array,v=0,g=m.length;v<g;v++){var y=m[v];h.fromArray(f,3*y),x(h,y)}else{v=0;for(var b=f.length/3;v<b;v++)h.fromArray(f,3*v),x(h,v)}}else{var _=a.vertices;for(v=0,b=_.length;v<b;v++)x(_[v],v)}}function x(t,n){var a=e.distanceSqToPoint(t);if(a<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=r.ray.origin.distanceTo(p);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:p.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),to.prototype=Object.assign(Object.create(Cn.prototype),{constructor:to,isGroup:!0}),eo.prototype=Object.assign(Object.create(rn.prototype),{constructor:eo,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),no.prototype=Object.create(rn.prototype),no.prototype.constructor=no,no.prototype.isCompressedTexture=!0,ro.prototype=Object.create(rn.prototype),ro.prototype.constructor=ro,ro.prototype.isDepthTexture=!0,io.prototype=Object.create(Jn.prototype),io.prototype.constructor=io,oo.prototype=Object.create(Fn.prototype),oo.prototype.constructor=oo,ao.prototype=Object.create(Jn.prototype),ao.prototype.constructor=ao,so.prototype=Object.create(Fn.prototype),so.prototype.constructor=so,co.prototype=Object.create(Jn.prototype),co.prototype.constructor=co,uo.prototype=Object.create(Fn.prototype),uo.prototype.constructor=uo,lo.prototype=Object.create(co.prototype),lo.prototype.constructor=lo,ho.prototype=Object.create(Fn.prototype),ho.prototype.constructor=ho,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,fo.prototype=Object.create(Fn.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(co.prototype),mo.prototype.constructor=mo,vo.prototype=Object.create(Fn.prototype),vo.prototype.constructor=vo,go.prototype=Object.create(co.prototype),go.prototype.constructor=go,yo.prototype=Object.create(Fn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Jn.prototype),bo.prototype.constructor=bo,_o.prototype=Object.create(Fn.prototype),_o.prototype.constructor=_o,xo.prototype=Object.create(Jn.prototype),xo.prototype.constructor=xo,wo.prototype=Object.create(Fn.prototype),wo.prototype.constructor=wo,Eo.prototype=Object.create(Jn.prototype),Eo.prototype.constructor=Eo;var To=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,l=e&&e.length,h=l?e[0]*n:t.length,p=Mo(t,0,h,n,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Mo(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(Do(c));for(u.sort(No),i=0;i<u.length;i++)Oo(u[i],n),n=So(n,n.next);return n}(t,e,p,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var f=n;f<h;f+=n)s=t[f],c=t[f+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ao(p,d,n,r,i,u),d};function Mo(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=jo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=jo(o,t[o],t[o+1],a);return a&&Bo(a,a.next)&&(Vo(a),a=a.next),a}function So(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Bo(r,r.next)&&0!==Ho(r.prev,r,r.next))r=r.next;else{if(Vo(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ao(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=Io(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Co(t,r,i,o):Ro(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),Vo(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ao(t=Lo(t,e,n),e,n,r,i,o,2):2===a&&Po(t,e,n,r,i,o):Ao(So(t),e,n,r,i,o,1);break}}}function Ro(t){var e=t.prev,n=t,r=t.next;if(Ho(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Fo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ho(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Co(t,e,n,r){var i=t.prev,o=t,a=t.next;if(Ho(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Io(s,c,e,n,r),p=Io(u,l,e,n,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=h;){if(d!==t.prev&&d!==t.next&&Fo(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Ho(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function Lo(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Bo(i,o)&&zo(i,r,r.next,o)&&ko(i,o)&&ko(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),Vo(r),Vo(r.next),r=t=o),r=r.next}while(r!==t);return r}function Po(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Uo(a,s)){var c=Go(a,s);return a=So(a,a.next),c=So(c,c.next),Ao(a,e,n,r,i,o),void Ao(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function No(t,e){return t.x-e.x}function Oo(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,l=n.x,h=n.y,p=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=l&&i!==r.x&&Fo(o<h?i:a,o,l,h,o<h?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<p||c===p&&r.x>n.x)&&ko(r,t)&&(n=r,p=c),r=r.next;return n}(t,e)){var n=Go(e,t);So(n,n.next)}}function Io(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function Fo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ko(t,e)&&ko(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Ho(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Bo(t,e){return t.x===e.x&&t.y===e.y}function zo(t,e,n,r){return!!(Bo(t,e)&&Bo(n,r)||Bo(t,r)&&Bo(n,e))||Ho(t,e,n)>0!=Ho(t,e,r)>0&&Ho(n,r,t)>0!=Ho(n,r,e)>0}function ko(t,e){return Ho(t.prev,t,t.next)<0?Ho(t,e,t.next)>=0&&Ho(t,t.prev,e)>=0:Ho(t,e,t.prev)<0||Ho(t,t.next,e)<0}function Go(t,e){var n=new Wo(t.i,t.x,t.y),r=new Wo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function jo(t,e,n,r){var i=new Wo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Xo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return Xo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];qo(t),Yo(n,t);var o=t.length;e.forEach(qo);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,Yo(n,e[a]);var s=To(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function qo(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function Zo(t,e){Fn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Jo(t,e)),this.mergeVertices()}function Jo(t,e){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o,a,s,c,u,l,h,p,d=[],f=void 0!==e.curveSegments?e.curveSegments:12,m=void 0!==e.steps?e.steps:1,v=void 0!==e.amount?e.amount:100,g=void 0===e.bevelEnabled||e.bevelEnabled,y=void 0!==e.bevelThickness?e.bevelThickness:6,b=void 0!==e.bevelSize?e.bevelSize:y-2,_=void 0!==e.bevelSegments?e.bevelSegments:3,x=e.extrudePath,w=void 0!==e.UVGenerator?e.UVGenerator:Ko,E=!1;x&&(o=x.getSpacedPoints(m),E=!0,g=!1,a=x.computeFrenetFrames(m,!1),s=new Ye,c=new Ye,u=new Ye),g||(_=0,y=0,b=0);var T=t.extractPoints(f),M=T.shape,S=T.holes;if(!Xo.isClockWise(M))for(M=M.reverse(),h=0,p=S.length;h<p;h++)l=S[h],Xo.isClockWise(l)&&(S[h]=l.reverse());var A=Xo.triangulateShape(M,S),R=M;for(h=0,p=S.length;h<p;h++)l=S[h],M=M.concat(l);function C(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var L,P,N,O,I,D,F=M.length,U=A.length;function H(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,l=a*a+s*s,h=a*u-s*c;if(Math.abs(h)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+u*u),f=e.x-s/p,m=e.y+a/p,v=((n.x-u/d-f)*u-(n.y+c/d-m)*c)/(a*u-s*c),g=(r=f+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new We(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(l)):(r=a,i=s,o=Math.sqrt(l/2))}return new We(r/o,i/o)}for(var B=[],z=0,k=R.length,G=k-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),B[z]=H(R[z],R[G],R[j]);var V,W,X=[],q=B.concat();for(h=0,p=S.length;h<p;h++){for(l=S[h],V=[],z=0,G=(k=l.length)-1,j=z+1;z<k;z++,G++,j++)G===k&&(G=0),j===k&&(j=0),V[z]=H(l[z],l[G],l[j]);X.push(V),q=q.concat(V)}for(L=0;L<_;L++){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,-O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)Z((I=C(l[z],V[z],P)).x,I.y,-O)}for(P=b,z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[0]).multiplyScalar(I.x),s.copy(a.binormals[0]).multiplyScalar(I.y),u.copy(o[0]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,0);for(W=1;W<=m;W++)for(z=0;z<F;z++)I=g?C(M[z],q[z],P):M[z],E?(c.copy(a.normals[W]).multiplyScalar(I.x),s.copy(a.binormals[W]).multiplyScalar(I.y),u.copy(o[W]).add(c).add(s),Z(u.x,u.y,u.z)):Z(I.x,I.y,v/m*W);for(L=_-1;L>=0;L--){for(N=L/_,O=y*Math.cos(N*Math.PI/2),P=b*Math.sin(N*Math.PI/2),z=0,k=R.length;z<k;z++)Z((I=C(R[z],B[z],P)).x,I.y,v+O);for(h=0,p=S.length;h<p;h++)for(l=S[h],V=X[h],z=0,k=l.length;z<k;z++)I=C(l[z],V[z],P),E?Z(I.x,I.y+o[m-1].y,o[m-1].x+O):Z(I.x,I.y,v+O)}function Y(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=m+2*_;for(i=0;i<o;i++){var a=F*i,s=F*(i+1);K(e+n+a,e+r+a,e+r+s,e+n+s)}}}function Z(t,e,n){d.push(t),d.push(e),d.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=w.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=w.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(d[3*t+0]),r.push(d[3*t+1]),r.push(d[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(g){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=m+2*_),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*m,D[1]+F*m,D[2]+F*m)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Y(R,e),e+=R.length,h=0,p=S.length;h<p;h++)Y(l=S[h],e),e+=l.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Wn(r,3)),this.addAttribute("uv",new Wn(i,2)),this.computeVertexNormals()}Zo.prototype=Object.create(Fn.prototype),Zo.prototype.constructor=Zo,Jo.prototype=Object.create(Jn.prototype),Jo.prototype.constructor=Jo;var Ko={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],l=e[3*i+1];return[new We(o,a),new We(s,c),new We(u,l)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],l=e[3*r+1],h=e[3*r+2],p=e[3*i],d=e[3*i+1],f=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-l)<.01?[new We(a,1-c),new We(u,1-h),new We(p,1-f),new We(m,1-g)]:[new We(s,1-c),new We(l,1-h),new We(d,1-f),new We(v,1-g)]}};function Qo(t,e){Fn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new $o(t,e)),this.mergeVertices()}function $o(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Fn;var r=n.generateShapes(t,e.size,e.curveSegments);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),Jo.call(this,r,e),this.type="TextBufferGeometry"}function ta(t,e,n,r,i,o,a){Fn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new ea(t,e,n,r,i,o,a)),this.mergeVertices()}function ea(t,e,n,r,i,o,a){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),l=0,h=[],p=new Ye,d=new Ye,f=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],b=c/n;for(s=0;s<=e;s++){var _=s/e;p.x=-t*Math.cos(r+_*i)*Math.sin(o+b*a),p.y=t*Math.cos(o+b*a),p.z=t*Math.sin(r+_*i)*Math.sin(o+b*a),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),v.push(d.x,d.y,d.z),g.push(_,1-b),y.push(l++)}h.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var x=h[c][s+1],w=h[c][s],E=h[c+1][s],T=h[c+1][s+1];(0!==c||o>0)&&f.push(x,w,T),(c!==n-1||u<Math.PI)&&f.push(w,E,T)}this.setIndex(f),this.addAttribute("position",new Wn(m,3)),this.addAttribute("normal",new Wn(v,3)),this.addAttribute("uv",new Wn(g,2))}function na(t,e,n,r,i,o){Fn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ra(t,e,n,r,i,o)),this.mergeVertices()}function ra(t,e,n,r,i,o){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],l=[],h=[],p=[],d=t,f=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ye,v=new We;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=d*Math.cos(a),m.y=d*Math.sin(a),l.push(m.x,m.y,m.z),h.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,b=a+n+1,_=a+n+2,x=a+1;u.push(y,b,x),u.push(b,_,x)}}this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function ia(t,e,n,r){Fn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new oa(t,e,n,r)),this.mergeVertices()}function oa(t,e,n,r){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ve.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],l=1/e,h=new Ye,p=new We;for(o=0;o<=e;o++){var d=n+o*l*r,f=Math.sin(d),m=Math.cos(d);for(a=0;a<=t.length-1;a++)h.x=t[a].x*f,h.y=t[a].y,h.z=t[a].x*m,c.push(h.x,h.y,h.z),p.x=o/e,p.y=a/(t.length-1),u.push(p.x,p.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,b=i+1;s.push(v,g,b),s.push(g,y,b)}if(this.setIndex(s),this.addAttribute("position",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,x=new Ye,w=new Ye,E=new Ye;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)x.x=_[a+0],x.y=_[a+1],x.z=_[a+2],w.x=_[i+a+0],w.y=_[i+a+1],w.z=_[i+a+2],E.addVectors(x,w).normalize(),_[a+0]=_[i+a+0]=E.x,_[a+1]=_[i+a+1]=E.y,_[a+2]=_[i+a+2]=E.z}}function aa(t,e){Fn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new sa(t,e)),this.mergeVertices()}function sa(t,e){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,l=r.length/3,h=t.extractPoints(e),p=h.shape,d=h.holes;if(!1===Xo.isClockWise(p))for(p=p.reverse(),a=0,c=d.length;a<c;a++)u=d[a],!0===Xo.isClockWise(u)&&(d[a]=u.reverse());var f=Xo.triangulateShape(p,d);for(a=0,c=d.length;a<c;a++)u=d[a],p=p.concat(u);for(a=0,c=p.length;a<c;a++){var m=p[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=f.length;a<c;a++){var v=f[a],g=v[0]+l,y=v[1]+l,b=v[2]+l;n.push(g,y,b),s+=3}}this.setIndex(n),this.addAttribute("position",new Wn(r,3)),this.addAttribute("normal",new Wn(i,3)),this.addAttribute("uv",new Wn(o,2))}function ca(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function ua(t,e){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ve.DEG2RAD*e),c=[0,0],u={},l=["a","b","c"];t.isBufferGeometry?(o=new Fn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,p=o.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:u[i].face2=d;for(i in u){var g=u[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Wn(a,3))}function la(t,e,n,r,i,o,a,s){Fn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new ha(t,e,n,r,i,o,a,s)),this.mergeVertices()}function ha(t,e,n,r,i,o,a,s){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],l=[],h=[],p=[],d=0,f=[],m=n/2,v=0;function g(n){var i,o,f,g=new We,y=new Ye,b=0,_=!0===n?t:e,x=!0===n?1:-1;for(o=d,i=1;i<=r;i++)l.push(0,m*x,0),h.push(0,x,0),p.push(.5,.5),d++;for(f=d,i=0;i<=r;i++){var w=i/r*s+a,E=Math.cos(w),T=Math.sin(w);y.x=_*T,y.y=m*x,y.z=_*E,l.push(y.x,y.y,y.z),h.push(0,x,0),g.x=.5*E+.5,g.y=.5*T*x+.5,p.push(g.x,g.y),d++}for(i=0;i<r;i++){var M=o+i,S=f+i;!0===n?u.push(S,S+1,M):u.push(S+1,S,M),b+=3}c.addGroup(v,b,!0===n?1:2),v+=b}!function(){var o,g,y=new Ye,b=new Ye,_=0,x=(e-t)/n;for(g=0;g<=i;g++){var w=[],E=g/i,T=E*(e-t)+t;for(o=0;o<=r;o++){var M=o/r,S=M*s+a,A=Math.sin(S),R=Math.cos(S);b.x=T*A,b.y=-E*n+m,b.z=T*R,l.push(b.x,b.y,b.z),y.set(A,x,R).normalize(),h.push(y.x,y.y,y.z),p.push(M,1-E),w.push(d++)}f.push(w)}for(o=0;o<r;o++)for(g=0;g<i;g++){var C=f[g][o],L=f[g+1][o],P=f[g+1][o+1],N=f[g][o+1];u.push(C,L,N),u.push(L,P,N),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Wn(l,3)),this.addAttribute("normal",new Wn(h,3)),this.addAttribute("uv",new Wn(p,2))}function pa(t,e,n,r,i,o,a){la.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function da(t,e,n,r,i,o,a){ha.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function fa(t,e,n,r){Fn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ma(t,e,n,r)),this.mergeVertices()}function ma(t,e,n,r){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],l=new Ye,h=new We;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var p=n+o/e*r;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),h.x=(s[i]/t+1)/2,h.y=(s[i+1]/t+1)/2,u.push(h.x,h.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Wn(s,3)),this.addAttribute("normal",new Wn(c,3)),this.addAttribute("uv",new Wn(u,2))}Qo.prototype=Object.create(Fn.prototype),Qo.prototype.constructor=Qo,$o.prototype=Object.create(Jo.prototype),$o.prototype.constructor=$o,ta.prototype=Object.create(Fn.prototype),ta.prototype.constructor=ta,ea.prototype=Object.create(Jn.prototype),ea.prototype.constructor=ea,na.prototype=Object.create(Fn.prototype),na.prototype.constructor=na,ra.prototype=Object.create(Jn.prototype),ra.prototype.constructor=ra,ia.prototype=Object.create(Fn.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Jn.prototype),oa.prototype.constructor=oa,aa.prototype=Object.create(Fn.prototype),aa.prototype.constructor=aa,aa.prototype.toJSON=function(){var t=Fn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},sa.prototype=Object.create(Jn.prototype),sa.prototype.constructor=sa,sa.prototype.toJSON=function(){var t=Jn.prototype.toJSON.call(this);return ca(this.parameters.shapes,t)},ua.prototype=Object.create(Jn.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(Fn.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Jn.prototype),ha.prototype.constructor=ha,pa.prototype=Object.create(la.prototype),pa.prototype.constructor=pa,da.prototype=Object.create(ha.prototype),da.prototype.constructor=da,fa.prototype=Object.create(Fn.prototype),fa.prototype.constructor=fa,ma.prototype=Object.create(Jn.prototype),ma.prototype.constructor=ma;var va=Object.freeze({WireframeGeometry:io,ParametricGeometry:oo,ParametricBufferGeometry:ao,TetrahedronGeometry:uo,TetrahedronBufferGeometry:lo,OctahedronGeometry:ho,OctahedronBufferGeometry:po,IcosahedronGeometry:fo,IcosahedronBufferGeometry:mo,DodecahedronGeometry:vo,DodecahedronBufferGeometry:go,PolyhedronGeometry:so,PolyhedronBufferGeometry:co,TubeGeometry:yo,TubeBufferGeometry:bo,TorusKnotGeometry:_o,TorusKnotBufferGeometry:xo,TorusGeometry:wo,TorusBufferGeometry:Eo,TextGeometry:Qo,TextBufferGeometry:$o,SphereGeometry:ta,SphereBufferGeometry:ea,RingGeometry:na,RingBufferGeometry:ra,PlaneGeometry:$n,PlaneBufferGeometry:tr,LatheGeometry:ia,LatheBufferGeometry:oa,ShapeGeometry:aa,ShapeBufferGeometry:sa,ExtrudeGeometry:Zo,ExtrudeBufferGeometry:Jo,EdgesGeometry:ua,ConeGeometry:pa,ConeBufferGeometry:da,CylinderGeometry:la,CylinderBufferGeometry:ha,CircleGeometry:fa,CircleBufferGeometry:ma,BoxGeometry:Kn,BoxBufferGeometry:Qn});function ga(t){ur.call(this),this.type="ShadowMaterial",this.color=new gn(0),this.transparent=!0,this.setValues(t)}function ya(t){hr.call(this,t),this.type="RawShaderMaterial"}function ba(t){ur.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new gn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function _a(t){ba.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function xa(t){ur.call(this),this.type="MeshPhongMaterial",this.color=new gn(16777215),this.specular=new gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function wa(t){xa.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Ea(t){ur.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new We(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ta(t){ur.call(this),this.type="MeshLambertMaterial",this.color=new gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ct,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Ma(t){Yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}ga.prototype=Object.create(ur.prototype),ga.prototype.constructor=ga,ga.prototype.isShadowMaterial=!0,ga.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this},ya.prototype=Object.create(hr.prototype),ya.prototype.constructor=ya,ya.prototype.isRawShaderMaterial=!0,ba.prototype=Object.create(ur.prototype),ba.prototype.constructor=ba,ba.prototype.isMeshStandardMaterial=!0,ba.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},_a.prototype=Object.create(ba.prototype),_a.prototype.constructor=_a,_a.prototype.isMeshPhysicalMaterial=!0,_a.prototype.copy=function(t){return ba.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},xa.prototype=Object.create(ur.prototype),xa.prototype.constructor=xa,xa.prototype.isMeshPhongMaterial=!0,xa.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},wa.prototype=Object.create(xa.prototype),wa.prototype.constructor=wa,wa.prototype.isMeshToonMaterial=!0,wa.prototype.copy=function(t){return xa.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Ea.prototype=Object.create(ur.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isMeshNormalMaterial=!0,Ea.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ta.prototype=Object.create(ur.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshLambertMaterial=!0,Ta.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ma.prototype=Object.create(Yi.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineDashedMaterial=!0,Ma.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Sa=Object.freeze({ShadowMaterial:ga,SpriteMaterial:Gi,RawShaderMaterial:ya,ShaderMaterial:hr,PointsMaterial:Qi,MeshPhysicalMaterial:_a,MeshStandardMaterial:ba,MeshPhongMaterial:xa,MeshToonMaterial:wa,MeshNormalMaterial:Ea,MeshLambertMaterial:Ta,MeshDepthMaterial:Ri,MeshDistanceMaterial:Ci,MeshBasicMaterial:lr,LineDashedMaterial:Ma,LineBasicMaterial:Yi,Material:ur}),Aa={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function Ra(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var Ca=new Ra,La={};function Pa(t){this.manager=void 0!==t?t:Ca}function Na(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Oa(t){this.manager=void 0!==t?t:Ca,this._parser=null}function Ia(t){this.manager=void 0!==t?t:Ca}function Da(t){this.manager=void 0!==t?t:Ca}function Fa(t){this.manager=void 0!==t?t:Ca}function Ua(){this.type="Curve",this.arcLengthDivisions=200}function Ha(t,e,n,r,i,o,a,s){Ua.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Ba(t,e,n,r,i,o){Ha.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function za(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(Pa.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===La[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var l,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var p=new Uint8Array(u.length),d=0;d<u.length;d++)p[d]=u.charCodeAt(d);l="blob"===h?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(u,s);break;case"json":l=JSON.parse(u);break;default:l=u}window.setTimeout(function(){e&&e(l),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{La[t]=[],La[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Aa.add(t,n);var r=La[t];if(delete La[t],200===this.status){for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=La[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=La[t];delete La[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(t),m}La[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Na.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new no;a.image=o;var s=new Pa(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,l=0,h=t.length;l<h;++l)c(l);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=Lt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Oa.prototype,{load:function(t,e,n,r){var i=this,o=new cn,a=new Pa(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:Mt,o.wrapT=void 0!==n.wrapT?n.wrapT:Mt,o.magFilter=void 0!==n.magFilter?n.magFilter:Lt,o.minFilter=void 0!==n.minFilter?n.minFilter:Nt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=Lt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(Ia.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Aa.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Da.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new gr,o=new Ia(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Fa.prototype,{crossOrigin:"Anonymous",load:function(t,e,n,r){var i=new rn,o=new Ia(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\\.(jpg|jpeg)$/)>0||0===t.search(/^data\\:image\\/jpeg/);i.format=r?Xt:qt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ua.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ye,a=[],s=[],c=[],u=new Ye,l=new Xe;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ye,c[0]=new Ye;var h=Number.MAX_VALUE,p=Math.abs(a[0].x),d=Math.abs(a[0].y),f=Math.abs(a[0].z);for(p<=h&&(h=p,o.set(1,0,0)),d<=h&&(h=d,o.set(0,1,0)),f<=h&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ve.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(l.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ve.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(l.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Ha.prototype=Object.create(Ua.prototype),Ha.prototype.constructor=Ha,Ha.prototype.isEllipseCurve=!0,Ha.prototype.getPoint=function(t,e){for(var n=e||new We,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),l=Math.sin(this.aRotation),h=s-this.aX,p=c-this.aY;s=h*u-p*l+this.aX,c=h*l+p*u+this.aY}return n.set(s,c)},Ha.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ha.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Ha.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Ba.prototype=Object.create(Ha.prototype),Ba.prototype.constructor=Ba,Ba.prototype.isArcCurve=!0;var ka=new Ye,Ga=new za,ja=new za,Va=new za;function Wa(t,e,n,r){Ua.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Xa(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function qa(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function Ya(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function Za(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We,this.v3=r||new We}function Ja(t,e,n,r){Ua.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye,this.v3=r||new Ye}function Ka(t,e){Ua.call(this),this.type="LineCurve",this.v1=t||new We,this.v2=e||new We}function Qa(t,e){Ua.call(this),this.type="LineCurve3",this.v1=t||new Ye,this.v2=e||new Ye}function $a(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve",this.v0=t||new We,this.v1=e||new We,this.v2=n||new We}function ts(t,e,n){Ua.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ye,this.v1=e||new Ye,this.v2=n||new Ye}function es(t){Ua.call(this),this.type="SplineCurve",this.points=t||[]}Wa.prototype=Object.create(Ua.prototype),Wa.prototype.constructor=Wa,Wa.prototype.isCatmullRomCurve3=!0,Wa.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ye,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,l=Math.floor(u),h=u-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===h&&l===c-1&&(l=c-2,h=1),this.closed||l>0?n=s[(l-1)%c]:(ka.subVectors(s[0],s[1]).add(s[0]),n=ka),r=s[l%c],i=s[(l+1)%c],this.closed||l+2<c?o=s[(l+2)%c]:(ka.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=ka),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(n.distanceToSquared(r),p),f=Math.pow(r.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(o),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ga.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,d,f,m),ja.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,d,f,m),Va.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,d,f,m)}else"catmullrom"===this.curveType&&(Ga.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),ja.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),Va.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(Ga.calc(h),ja.calc(h),Va.calc(h)),a},Wa.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Wa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Wa.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ye).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Za.prototype=Object.create(Ua.prototype),Za.prototype.constructor=Za,Za.prototype.isCubicBezierCurve=!0,Za.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y)),n},Za.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Za.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Za.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ja.prototype=Object.create(Ua.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isCubicBezierCurve3=!0,Ja.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(Ya(t,r.x,i.x,o.x,a.x),Ya(t,r.y,i.y,o.y,a.y),Ya(t,r.z,i.z,o.z,a.z)),n},Ja.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ja.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ja.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ka.prototype=Object.create(Ua.prototype),Ka.prototype.constructor=Ka,Ka.prototype.isLineCurve=!0,Ka.prototype.getPoint=function(t,e){var n=e||new We;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ka.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ka.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Ka.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ka.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ka.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qa.prototype=Object.create(Ua.prototype),Qa.prototype.constructor=Qa,Qa.prototype.isLineCurve3=!0,Qa.prototype.getPoint=function(t,e){var n=e||new Ye;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Qa.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Qa.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qa.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qa.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$a.prototype=Object.create(Ua.prototype),$a.prototype.constructor=$a,$a.prototype.isQuadraticBezierCurve=!0,$a.prototype.getPoint=function(t,e){var n=e||new We,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y)),n},$a.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},$a.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},$a.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},ts.prototype=Object.create(Ua.prototype),ts.prototype.constructor=ts,ts.prototype.isQuadraticBezierCurve3=!0,ts.prototype.getPoint=function(t,e){var n=e||new Ye,r=this.v0,i=this.v1,o=this.v2;return n.set(qa(t,r.x,i.x,o.x),qa(t,r.y,i.y,o.y),qa(t,r.z,i.z,o.z)),n},ts.prototype.copy=function(t){return Ua.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ts.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ts.prototype.fromJSON=function(t){return Ua.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},es.prototype=Object.create(Ua.prototype),es.prototype.constructor=es,es.prototype.isSplineCurve=!0,es.prototype.getPoint=function(t,e){var n=e||new We,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],l=r[o>r.length-3?r.length-1:o+2];return n.set(Xa(a,s.x,c.x,u.x,l.x),Xa(a,s.y,c.y,u.y,l.y)),n},es.prototype.copy=function(t){Ua.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},es.prototype.toJSON=function(){var t=Ua.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},es.prototype.fromJSON=function(t){Ua.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new We).fromArray(r))}return this};var ns=Object.freeze({ArcCurve:Ba,CatmullRomCurve3:Wa,CubicBezierCurve:Za,CubicBezierCurve3:Ja,EllipseCurve:Ha,LineCurve:Ka,LineCurve3:Qa,QuadraticBezierCurve:$a,QuadraticBezierCurve3:ts,SplineCurve:es});function rs(){Ua.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function is(t){rs.call(this),this.type="Path",this.currentPoint=new We,t&&this.setFromPoints(t)}function os(t){is.call(this,t),this.uuid=Ve.generateUUID(),this.type="Shape",this.holes=[]}function as(t,e){Cn.call(this),this.type="Light",this.color=new gn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function ss(t,e,n){as.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.groundColor=new gn(e)}function cs(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new We(512,512),this.map=null,this.matrix=new Xe}function us(){cs.call(this,new Di(50,1,.5,500))}function ls(t,e,n,r,i,o){as.call(this,t,e),this.type="SpotLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new us}function hs(t,e,n,r){as.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new cs(new Di(90,1,.5,500))}function ps(){cs.call(this,new Pn(-5,5,5,-5,.5,500))}function ds(t,e){as.call(this,t,e),this.type="DirectionalLight",this.position.copy(Cn.DefaultUp),this.updateMatrix(),this.target=new Cn,this.shadow=new ps}function fs(t,e){as.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function ms(t,e,n,r){as.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function vs(t,e,n,r){As.call(this,t,e,n,r)}function gs(t,e,n){As.call(this,t,e,n)}function ys(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function bs(t,e,n,r){ys.call(this,t,e,n,r)}function _s(t,e,n,r){As.call(this,t,e,n,r)}function xs(t,e,n,r){As.call(this,t,e,n,r)}function ws(t,e,n,r){As.call(this,t,e,n,r)}function Es(t,e,n,r){ys.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Ts(t,e,n,r){ys.call(this,t,e,n,r)}function Ms(t,e,n,r){ys.call(this,t,e,n,r)}rs.prototype=Object.assign(Object.create(Ua.prototype),{constructor:rs,add:function(t){this.curves.push(t)},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 Ka(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){Ua.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ua.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){Ua.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new ns[r.type]).fromJSON(r))}return this}}),is.prototype=Object.assign(Object.create(rs.prototype),{constructor:is,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Ka(this.currentPoint.clone(),new We(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new $a(this.currentPoint.clone(),new We(t,e),new We(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new Za(this.currentPoint.clone(),new We(t,e),new We(n,r),new We(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new es([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new Ha(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return rs.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=rs.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return rs.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),os.prototype=Object.assign(Object.create(is.prototype),{constructor:os,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){is.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=is.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){is.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new is).fromJSON(r))}return this}}),as.prototype=Object.assign(Object.create(Cn.prototype),{constructor:as,isLight:!0,copy:function(t){return Cn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=Cn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),ss.prototype=Object.assign(Object.create(as.prototype),{constructor:ss,isHemisphereLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(cs.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),us.prototype=Object.assign(Object.create(cs.prototype),{constructor:us,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ve.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),ls.prototype=Object.assign(Object.create(as.prototype),{constructor:ls,isSpotLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),hs.prototype=Object.assign(Object.create(as.prototype),{constructor:hs,isPointLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),ps.prototype=Object.assign(Object.create(cs.prototype),{constructor:ps}),ds.prototype=Object.assign(Object.create(as.prototype),{constructor:ds,isDirectionalLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),fs.prototype=Object.assign(Object.create(as.prototype),{constructor:fs,isAmbientLight:!0}),ms.prototype=Object.assign(Object.create(as.prototype),{constructor:ms,isRectAreaLight:!0,copy:function(t){return as.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=as.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),vs.prototype=Object.assign(Object.create(As.prototype),{constructor:vs,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),gs.prototype=Object.assign(Object.create(As.prototype),{constructor:gs,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Me,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ys.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(ys.prototype,{beforeStart_:ys.prototype.copySampleValue_,afterEnd_:ys.prototype.copySampleValue_}),bs.prototype=Object.assign(Object.create(ys.prototype),{constructor:bs,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)qe.slerpFlat(i,0,o,s-a,o,s,c);return i}}),_s.prototype=Object.assign(Object.create(As.prototype),{constructor:_s,ValueTypeName:"quaternion",DefaultInterpolation:Se,InterpolantFactoryMethodLinear:function(t){return new bs(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),xs.prototype=Object.assign(Object.create(As.prototype),{constructor:xs,ValueTypeName:"color"}),ws.prototype=Object.assign(Object.create(As.prototype),{constructor:ws,ValueTypeName:"number"}),Es.prototype=Object.assign(Object.create(ys.prototype),{constructor:Es,DefaultSettings_:{endingStart:Re,endingEnd:Re},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case Ce:i=t,a=2*e-n;break;case Le:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case Ce:o=t,s=2*n-e;break;case Le:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,p=this._weightNext,d=(n-e)/(r-e),f=d*d,m=f*d,v=-h*m+2*h*f-h*d,g=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,b=p*m-p*f,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+b*o[l+_];return i}}),Ts.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ts,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),l=1-u,h=0;h!==a;++h)i[h]=o[c+h]*l+o[s+h]*u;return i}}),Ms.prototype=Object.assign(Object.create(ys.prototype),{constructor:Ms,interpolate_:function(t){return this.copySampleValue_(t-1)}});var Ss={arraySlice:function(t,e,n){return Ss.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function As(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ss.convertArray(e,this.TimeBufferType),this.values=Ss.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function Rs(t,e,n,r){As.call(this,t,e,n,r)}function Cs(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ve.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Ls(t){this.manager=void 0!==t?t:Ca,this.textures={}}function Ps(t){this.manager=void 0!==t?t:Ca}Object.assign(As,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=As._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Ss.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ss.convertArray(t.times,Array),values:Ss.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ws;case"vector":case"vector2":case"vector3":case"vector4":return Rs;case"color":return xs;case"quaternion":return _s;case"bool":case"boolean":return gs;case"string":return vs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(As.prototype,{constructor:As,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Se,InterpolantFactoryMethodDiscrete:function(t){return new Ms(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Ts(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Es(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case Me:e=this.InterpolantFactoryMethodDiscrete;break;case Se:e=this.InterpolantFactoryMethodLinear;break;case Ae:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",n)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Me;case this.InterpolantFactoryMethodLinear:return Se;case this.InterpolantFactoryMethodSmooth:return Ae}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ss.arraySlice(n,i,o),this.values=Ss.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ss.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===Ae,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,l=u-n,h=u+n,p=0;p!==n;++p){var d=e[u+p];if(d!==e[l+p]||d!==e[h+p]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var f=a*n,m=i*n;for(p=0;p!==n;++p)e[m+p]=e[f+p]}++i}}if(o>0){t[i]=t[o];for(f=o*n,m=i*n,p=0;p!==n;++p)e[m+p]=e[f+p];++i}return i!==t.length&&(this.times=Ss.arraySlice(t,0,i),this.values=Ss.arraySlice(e,0,i*n)),this}}),Rs.prototype=Object.assign(Object.create(As.prototype),{constructor:Rs,ValueTypeName:"vector"}),Object.assign(Cs,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(As.parse(n[i]).scale(r));return new Cs(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(As.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ss.getKeyframeOrder(s);s=Ss.sortedArray(s,1,u),c=Ss.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new ws(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new Cs(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\\w-]*?)([\\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[h=c[1]];u||(r[h]=u=[]),u.push(s)}}var l=[];for(var h in r)l.push(Cs.CreateFromMorphTargetSequence(h,r[h],e,n));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ss.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var l={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var p=0;p<u[h].morphTargets.length;p++)l[u[h].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==u[h].morphTargets.length;++p){var v=u[h];f.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new ws(".morphTargetInfluence["+d+"]",f,m))}o=l.length*(a||1)}else{var g=".bones["+e[c].name+"]";n(Rs,g+".position",u,"pos",r),n(_s,g+".quaternion",u,"rot",r),n(Rs,g+".scale",u,"scl",r)}}return 0===r.length?null:new Cs(i,o,r)}}),Object.assign(Cs.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(Ls.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Sa[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalScale){var i=t.normalScale;!1===Array.isArray(i)&&(i=[i,i]),r.normalScale=(new We).fromArray(i)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(Ps.prototype,{load:function(t,e,n,r){var i=this;new Pa(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Jn,n=t.data.index;if(void 0!==n){var r=new Fs[n.type](n.array);e.setIndex(new Un(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new Fs[a.type](a.array);e.addAttribute(o,new Un(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var h=t.data.boundingSphere;if(void 0!==h){var p=new Ye;void 0!==h.center&&p.fromArray(h.center),e.boundingSphere=new ln(p,h.radius)}return e}});var Ns,Os,Is,Ds,Fs={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Us(){}Us.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(Us.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:(Ns={NoBlending:N,NormalBlending:O,AdditiveBlending:I,SubtractiveBlending:D,MultiplyBlending:F,CustomBlending:U},Os=new gn,Is=new Fa,Ds=new Ls,function(t,e,n){var r={};function i(t,i,o,a,s){var c,u=e+t,l=Us.Handlers.get(u);null!==l?c=l.load(u):(Is.setCrossOrigin(n),c=Is.load(u)),void 0!==i&&(c.repeat.fromArray(i),1!==i[0]&&(c.wrapS=Tt),1!==i[1]&&(c.wrapT=Tt)),void 0!==o&&c.offset.fromArray(o),void 0!==a&&("repeat"===a[0]&&(c.wrapS=Tt),"mirror"===a[0]&&(c.wrapS=St),"repeat"===a[1]&&(c.wrapT=Tt),"mirror"===a[1]&&(c.wrapT=St)),void 0!==s&&(c.anisotropy=s);var h=Ve.generateUUID();return r[h]=c,h}var o={uuid:Ve.generateUUID(),type:"MeshLambertMaterial"};for(var a in t){var s=t[a];switch(a){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":o.name=s;break;case"blending":o.blending=Ns[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",a,"is no longer supported.");break;case"colorDiffuse":o.color=Os.fromArray(s).getHex();break;case"colorSpecular":o.specular=Os.fromArray(s).getHex();break;case"colorEmissive":o.emissive=Os.fromArray(s).getHex();break;case"specularCoef":o.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(o.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(o.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(o.type="MeshStandardMaterial");break;case"mapDiffuse":o.map=i(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":o.emissiveMap=i(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":o.lightMap=i(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":o.aoMap=i(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":o.bumpMap=i(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":o.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":o.normalMap=i(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":o.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":o.specularMap=i(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":o.metalnessMap=i(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":o.roughnessMap=i(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":o.alphaMap=i(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":o.side=M;break;case"doubleSided":o.side=S;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),o.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":o[a]=s;break;case"vertexColors":!0===s&&(o.vertexColors=P),"face"===s&&(o.vertexColors=L);break;default:console.error("THREE.Loader.createMaterial: Unsupported",a,s)}}return"MeshBasicMaterial"===o.type&&delete o.emissive,"MeshPhongMaterial"!==o.type&&delete o.specular,o.opacity<1&&(o.transparent=!0),Ds.setTextures(r),Ds.parse(o)})});var Hs={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function Bs(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ca,this.withCredentials=!1}function zs(t){this.manager=void 0!==t?t:Ca,this.texturePath=""}Object.assign(Bs.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:Hs.extractUrlBase(t),a=new Pa(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new Fn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,l,h,p,d,f,m,v,g,y,b,_,x,w,E,T,M,S,A,R=t.faces,C=t.vertices,L=t.normals,P=t.colors,N=t.scale,O=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&O++;for(r=0;r<O;r++)e.faceVertexUvs[r]=[]}for(a=0,s=C.length;a<s;)(_=new Ye).x=C[a++]*N,_.y=C[a++]*N,_.z=C[a++]*N,e.vertices.push(_);for(a=0,s=R.length;a<s;)if(d=n(p=R[a++],0),f=n(p,1),m=n(p,3),v=n(p,4),g=n(p,5),y=n(p,6),b=n(p,7),d){if((w=new Nn).a=R[a],w.b=R[a+1],w.c=R[a+3],(E=new Nn).a=R[a+1],E.b=R[a+2],E.c=R[a+3],a+=4,f&&(h=R[a++],w.materialIndex=h,E.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*R[a++],w.normal.set(L[u++],L[u++],L[u]),E.normal.copy(w.normal)),g)for(r=0;r<4;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),2!==r&&w.vertexNormals.push(M),0!==r&&E.vertexNormals.push(M);if(y&&(T=P[c=R[a++]],w.color.setHex(T),E.color.setHex(T)),b)for(r=0;r<4;r++)T=P[c=R[a++]],2!==r&&w.vertexColors.push(new gn(T)),0!==r&&E.vertexColors.push(new gn(T));e.faces.push(w),e.faces.push(E)}else{if((x=new Nn).a=R[a++],x.b=R[a++],x.c=R[a++],f&&(h=R[a++],x.materialIndex=h),o=e.faces.length,m)for(r=0;r<O;r++)for(S=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new We(S[2*(l=R[a++])],S[2*l+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*R[a++],x.normal.set(L[u++],L[u++],L[u])),g)for(r=0;r<3;r++)u=3*R[a++],M=new Ye(L[u++],L[u++],L[u]),x.vertexNormals.push(M);if(y&&(c=R[a++],x.color.setHex(P[c])),b)for(r=0;r<3;r++)c=R[a++],x.vertexColors.push(new gn(P[c]));e.faces.push(x)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new on(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],l=n>1?t.skinIndices[r+1]:0,h=n>2?t.skinIndices[r+2]:0,p=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new on(u,l,h,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ye;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn(\'THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.\');var l=e.faces,h=t.morphColors[0].colors;for(r=0,i=l.length;r<i;r++)l[r].color.fromArray(h,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=Cs.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=Cs.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:Us.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(zs.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new Pa(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can\'t parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can\'t load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new os).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new Bs,i=new Ps,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new va[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new va[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new va[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new va[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new va[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new va[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new va[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new va[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new va[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new va[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new va[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new va[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],l=0,h=c.shapes.length;l<h;l++){var p=e[c.shapes[l]];u.push(p)}s=new va[c.type](u,c.curveSegments);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn(\'THREE.ObjectLoader: Unsupported geometry type "\'+c.type+\'"\');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new Ls;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=Cs.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new Ia(new Ra(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=/^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(u)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a=t[i];void 0===a.image&&console.warn(\'THREE.ObjectLoader: No "image" specified for\',a.uuid),void 0===e[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new rn(e[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Gs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],js),s.wrapT=n(a.wrap[1],js)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Vs)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Vs)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ki,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new gn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new zi(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new Bi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new Di(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new Pn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new fs(t.color,t.intensity);break;case"DirectionalLight":r=new ds(t.color,t.intensity);break;case"PointLight":r=new hs(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new ms(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new ls(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new ss(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new qi(a,s):new mr(a,s);break;case"LOD":r=new Vi;break;case"Line":r=new Zi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new Ki(i(t.geometry),o(t.material));break;case"LineSegments":r=new Ji(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new $i(i(t.geometry),o(t.material));break;case"Sprite":r=new ji(o(t.material));break;case"Group":r=new to;break;default:r=new Cn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var l=t.levels,h=0;h<l.length;h++){var p=l[h],d=r.getObjectByProperty("uuid",p.object);void 0!==d&&r.addLevel(d,p.distance)}return r}});var ks,Gs={UVMapping:vt,CubeReflectionMapping:gt,CubeRefractionMapping:yt,EquirectangularReflectionMapping:bt,EquirectangularRefractionMapping:_t,SphericalReflectionMapping:xt,CubeUVReflectionMapping:wt,CubeUVRefractionMapping:Et},js={RepeatWrapping:Tt,ClampToEdgeWrapping:Mt,MirroredRepeatWrapping:St},Vs={NearestFilter:At,NearestMipMapNearestFilter:Rt,NearestMipMapLinearFilter:Ct,LinearFilter:Lt,LinearMipMapNearestFilter:Pt,LinearMipMapLinearFilter:Nt};function Ws(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:Ca,this.options=void 0}function Xs(){this.type="ShapePath",this.color=new gn,this.subPaths=[],this.currentPath=null}function qs(t){this.type="Font",this.data=t}function Ys(t,e,n,r,i,o){var a=o.glyphs[t]||o.glyphs["?"];if(a){var s,c,u,l,h,p,d,f,m=new Xs;if(a.o)for(var v=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),g=0,y=v.length;g<y;){switch(v[g++]){case"m":s=v[g++]*n+r,c=v[g++]*n+i,m.moveTo(s,c);break;case"l":s=v[g++]*n+r,c=v[g++]*n+i,m.lineTo(s,c);break;case"q":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,m.quadraticCurveTo(h,p,u,l);break;case"b":u=v[g++]*n+r,l=v[g++]*n+i,h=v[g++]*n+r,p=v[g++]*n+i,d=v[g++]*n+r,f=v[g++]*n+i,m.bezierCurveTo(h,p,d,f,u,l)}}return{offsetX:a.ha*n,path:m}}}function Zs(t){this.manager=void 0!==t?t:Ca}Ws.prototype={constructor:Ws,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Aa.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Aa.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Xs.prototype,{moveTo:function(t,e){this.currentPath=new is,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new os;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=u*(t.x-a.x)-c*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=Xo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new os).curves=s.curves,u.push(c),u;var l=!i(o[0].getPoints());l=t?!l:l;var h,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(h=(s=o[g]).getPoints()),(a=t?!a:a)?(!l&&f[v]&&v++,f[v]={s:new os,p:h},f[v].s.curves=s.curves,l&&v++,m[v]=[]):m[v].push({h:s,p:h[0]});if(!f[0])return n(o);if(f.length>1){for(var b=!1,_=[],x=0,w=f.length;x<w;x++)d[x]=[];for(x=0,w=f.length;x<w;x++)for(var E=m[x],T=0;T<E.length;T++){for(var M=E[T],S=!0,A=0;A<f.length;A++)r(M.p,f[A].p)&&(x!==A&&_.push({froms:x,tos:A,hole:T}),S?(S=!1,d[A].push(M)):b=!0);S&&d[x].push(M)}_.length>0&&(b||(m=d))}g=0;for(var R=f.length;g<R;g++){c=f[g].s,u.push(c);for(var C=0,L=(p=m[g]).length;C<L;C++)c.holes.push(p[C].h)}return u}}),Object.assign(qs.prototype,{isFont:!0,generateShapes:function(t,e,n){void 0===e&&(e=100),void 0===n&&(n=4);for(var r=[],i=function(t,e,n,r){for(var i=String(t).split(""),o=e/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],c=0,u=0,l=0;l<i.length;l++){var h=i[l];if("\\n"===h)c=0,u-=a;else{var p=Ys(h,n,o,c,u,r);c+=p.offsetX,s.push(p.path)}}return s}(t,e,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Zs.prototype,{load:function(t,e,n,r){var i=this,o=new Pa(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new qs(t)},setPath:function(t){return this.path=t,this}});var Js,Ks,Qs,$s,tc,ec,nc,rc,ic,oc,ac={getContext:function(){return void 0===ks&&(ks=new(window.AudioContext||window.webkitAudioContext)),ks},setContext:function(t){ks=t}};function sc(t){this.manager=void 0!==t?t:Ca}function cc(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function uc(t,e,n){Cn.call(this),this.type="CubeCamera";var r=new Di(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ye(1,0,0)),this.add(r);var i=new Di(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ye(-1,0,0)),this.add(i);var o=new Di(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ye(0,1,0)),this.add(o);var a=new Di(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ye(0,-1,0)),this.add(a);var s=new Di(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ye(0,0,1)),this.add(s);var c=new Di(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ye(0,0,-1)),this.add(c);var u={format:Xt,magFilter:Lt,minFilter:Lt};this.renderTarget=new sn(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function lc(){Cn.call(this),this.type="AudioListener",this.context=ac.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function hc(t){Cn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function pc(t){hc.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function dc(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function fc(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(sc.prototype,{load:function(t,e,n,r){var i=new Pa(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){ac.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(cc.prototype,{update:(ic=new Xe,oc=new Xe,function(t){if(Js!==this||Ks!==t.focus||Qs!==t.fov||$s!==t.aspect*this.aspect||tc!==t.near||ec!==t.far||nc!==t.zoom||rc!==this.eyeSep){Js=this,Ks=t.focus,Qs=t.fov,$s=t.aspect*this.aspect,tc=t.near,ec=t.far,nc=t.zoom;var e,n,r=t.projectionMatrix.clone(),i=(rc=this.eyeSep/2)*tc/Ks,o=tc*Math.tan(Ve.DEG2RAD*Qs*.5)/nc;oc.elements[12]=-rc,ic.elements[12]=rc,e=-o*$s+i,n=o*$s+i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraL.projectionMatrix.copy(r),e=-o*$s-i,n=o*$s-i,r.elements[0]=2*tc/(n-e),r.elements[8]=(n+e)/(n-e),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(oc),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(ic)})}),uc.prototype=Object.create(Cn.prototype),uc.prototype.constructor=uc,lc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:lc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new Ye,e=new qe,n=new Ye,r=new Ye;return function(i){Cn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),hc.prototype=Object.assign(Object.create(Cn.prototype),{constructor:hc,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),pc.prototype=Object.assign(Object.create(hc.prototype),{constructor:pc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new Ye;return function(e){Cn.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(dc.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(fc.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){qe.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var mc,vc,gc,yc,bc,_c,xc,wc,Ec,Tc,Mc,Sc,Ac;function Rc(t,e,n){var r=n||Cc.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cc(t,e,n){this.path=e,this.parsedPath=n||Cc.parseTrackName(e),this.node=Cc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Lc(){this.uuid=Ve.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Pc(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:Re,endingEnd:Re},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ee,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Nc(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Oc(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ic(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Dc(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Fc(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Uc(t,e,n){Fc.call(this,t,e),this.meshPerAttribute=n||1}function Hc(t,e,n){Un.call(this,t,e),this.meshPerAttribute=n||1}function Bc(t,e,n,r){this.ray=new pr(t,e),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function zc(t,e){return t.distance-e.distance}function kc(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)kc(i[o],e,n,!0)}function Gc(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function jc(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function Vc(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Wc(t,e){this.min=void 0!==t?t:new We(1/0,1/0),this.max=void 0!==e?e:new We(-1/0,-1/0)}function Xc(t){Cn.call(this),this.material=t,this.render=function(){}}function qc(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Yc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Jn,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Wn(r,3));var c=new Yi({fog:!1});this.cone=new Ji(n,c),this.add(this.cone),this.update()}function Zc(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Jn,r=[],i=[],o=new gn(0,0,1),a=new gn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Wn(r,3)),n.addAttribute("color",new Wn(i,3));var u=new Yi({vertexColors:P,depthTest:!1,depthWrite:!1,transparent:!0});Ji.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Jc(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new ea(e,4,2),i=new lr({wireframe:!0,fog:!1});mr.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Kc(t,e){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new Yi({fog:!1}),r=new Jn;r.addAttribute("position",new Un(new Float32Array(15),3)),this.line=new Zi(r,n),this.add(this.line),this.update()}function Qc(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new po(e);r.rotateY(.5*Math.PI),this.material=new lr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=P);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new Un(o,3)),this.add(new mr(r,this.material)),this.update()}function $c(t,e,n,r){t=t||10,e=e||10,n=new gn(void 0!==n?n:4473924),r=new gn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,l=0,h=-a;u<=e;u++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var p=u===i?n:r;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new Jn;d.addAttribute("position",new Wn(s,3)),d.addAttribute("color",new Wn(c,3));var f=new Yi({vertexColors:P});Ji.call(this,d,f)}function tu(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new gn(void 0!==i?i:4473924),o=new gn(void 0!==o?o:8947848);var a,s,c,u,l,h,p,d=[],f=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(a,0,s),p=1&u?i:o,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(u=0;u<=n;u++)for(p=1&u?i:o,h=t-t/n*u,l=0;l<r;l++)c=l/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b),c=(l+1)/r*(2*Math.PI),a=Math.sin(c)*h,s=Math.cos(c)*h,d.push(a,0,s),f.push(p.r,p.g,p.b);var m=new Jn;m.addAttribute("position",new Wn(d,3)),m.addAttribute("color",new Wn(f,3));var v=new Yi({vertexColors:P});Ji.call(this,m,v)}function eu(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Jn,u=new Wn(2*a*3,3);c.addAttribute("position",u),Ji.call(this,c,new Yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nu(t,e,n){Cn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Jn;r.addAttribute("position",new Wn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new Yi({fog:!1});this.lightPlane=new Zi(r,i),this.add(this.lightPlane),(r=new Jn).addAttribute("position",new Wn([0,0,0,0,0,1],3)),this.targetLine=new Zi(r,i),this.add(this.targetLine),this.update()}function ru(t){var e=new Jn,n=new Yi({color:16777215,vertexColors:L}),r=[],i=[],o={},a=new gn(16755200),s=new gn(16711680),c=new gn(43775),u=new gn(16777215),l=new gn(3355443);function h(t,e,n){p(t,n),p(e,n)}function p(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}h("n1","n2",a),h("n2","n4",a),h("n4","n3",a),h("n3","n1",a),h("f1","f2",a),h("f2","f4",a),h("f4","f3",a),h("f3","f1",a),h("n1","f1",a),h("n2","f2",a),h("n3","f3",a),h("n4","f4",a),h("p","n1",s),h("p","n2",s),h("p","n3",s),h("p","n4",s),h("u1","u2",c),h("u2","u3",c),h("u3","u1",c),h("c","t",u),h("p","c",l),h("cn1","cn2",l),h("cn3","cn4",l),h("cf1","cf2",l),h("cf3","cf4",l),e.addAttribute("position",new Wn(r,3)),e.addAttribute("color",new Wn(i,3)),Ji.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function iu(t,e){this.object=t,void 0===e&&(e=16776960);var n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Jn;i.setIndex(new Un(n,1)),i.addAttribute("position",new Un(r,3)),Ji.call(this,i,new Yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ou(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Jn;i.setIndex(new Un(r,1)),i.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Ji.call(this,i,new Yi({color:n})),this.geometry.computeBoundingSphere()}function au(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Jn;i.addAttribute("position",new Wn([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,0,1,0,0,0],3)),i.computeBoundingSphere(),Zi.call(this,i,new Yi({color:r}));var o=new Jn;o.addAttribute("position",new Wn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new mr(o,new lr({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function su(t,e,n,r,i,o){Cn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===Tc&&((Tc=new Jn).addAttribute("position",new Wn([0,0,0,0,1,0],3)),(Mc=new ha(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Zi(Tc,new Yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new mr(Mc,new lr({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cu(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Jn;n.addAttribute("position",new Wn(e,3)),n.addAttribute("color",new Wn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new Yi({vertexColors:P});Ji.call(this,n,r)}function uu(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Nn(t,e,n,i,o,a)}Object.assign(Rc.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cc,{Composite:Rc,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cc.Composite(t,e,n):new Cc(t,e,n)},sanitizeNodeName:(Ec=new RegExp("[\\\\[\\\\]\\\\.:\\\\/]","g"),function(t){return t.replace(/\\s/g,"_").replace(Ec,"")}),parseTrackName:(mc="[^\\\\[\\\\]\\\\.:\\\\/]",vc="[^"+"\\\\[\\\\]\\\\.:\\\\/".replace("\\\\.","")+"]",gc=/((?:WC+[\\/:])*)/.source.replace("WC",mc),yc=/(WCOD+)?/.source.replace("WCOD",vc),bc=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace("WC",mc),_c=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace("WC",mc),xc=new RegExp("^"+gc+yc+bc+_c+"$"),wc=["material","materials","bones"],function(t){var e=xc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==wc.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cc.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cc.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn\'t found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn\'t found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),\n//!\\ DECLARE ALIAS AFTER assign prototype !\nObject.assign(Cc.prototype,{_getValue_unbound:Cc.prototype.getValue,_setValue_unbound:Cc.prototype.setValue}),Object.assign(Lc.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,l=arguments.length;u!==l;++u){var h=arguments[u],p=h.uuid,d=r[p];if(void 0===d){d=e++,r[p]=d,t.push(h);for(var f=0,m=s;f!==m;++f)a[f].push(new Cc(h,i[f],o[f]))}else if(d<n){c=t[d];var v=--n,g=t[v];r[g.uuid]=d,t[d]=g,r[p]=v,t[v]=h;for(f=0,m=s;f!==m;++f){var y=a[f],b=y[v],_=y[d];y[d]=b,void 0===_&&(_=new Cc(h,i[f],o[f])),y[v]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var l=e++,h=t[l];n[h.uuid]=u,t[u]=h,n[c]=l,t[l]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[l],v=f[u];f[u]=m,f[l]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var l=--n,h=t[l],p=t[g=--e];r[h.uuid]=u,t[u]=h,r[p.uuid]=l,t[l]=p,t.pop();for(var d=0,f=o;d!==f;++d){var m=(y=i[d])[l],v=y[g];y[u]=m,y[l]=v,y.pop()}}else{var g;r[(p=t[g=--e]).uuid]=u,t[u]=p,t.pop();for(d=0,f=o;d!==f;++d){var y;(y=i[d])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,l=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=u,p=s.length;h!==p;++h){var d=s[h];l[h]=new Cc(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Pc.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,l=0,h=c.length;l!==h;++l)c[l].evaluate(a),u[l].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===we){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===Te;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=Ce,r.endingEnd=Ce):(r.endingStart=t?this.zeroSlopeAtStart?Ce:Re:Le,r.endingEnd=e?this.zeroSlopeAtEnd?Ce:Re:Le)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Nc.prototype=Object.assign(Object.create(r.prototype),{constructor:Nc,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var l=0;l!==i;++l){var h=r[l],p=h.name,d=u[p];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new fc(Cc.create(n,p,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Ts(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Pc(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?Cs.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=u,e[u]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Oc.prototype.clone=function(){return new Oc(void 0===this.value.clone?this.value:this.value.clone())},Ic.prototype=Object.assign(Object.create(Jn.prototype),{constructor:Ic,isInstancedBufferGeometry:!0,copy:function(t){return Jn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Dc.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Dc.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Fc.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Fc.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Uc.prototype=Object.assign(Object.create(Fc.prototype),{constructor:Uc,isInstancedInterleavedBuffer:!0,copy:function(t){return Fc.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Hc.prototype=Object.assign(Object.create(Un.prototype),{constructor:Hc,isInstancedBufferAttribute:!0,copy:function(t){return Un.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bc.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return kc(t,this,r,e),r.sort(zc),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)kc(t[i],this,r,e);return r.sort(zc),r}}),Object.assign(Gc.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(jc.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ve.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(Vc.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Wc.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new We;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(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},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new We),this.isEmpty()?t.set(0,0):t.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)},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},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new We),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox: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)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new We),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new We;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)}}),Xc.prototype=Object.create(Cn.prototype),Xc.prototype.constructor=Xc,Xc.prototype.isImmediateRenderObject=!0,qc.prototype=Object.create(Ji.prototype),qc.prototype.constructor=qc,qc.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,l=0,h=c.length;l<h;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[r[d]]],v=p.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,d=0,f=g.count;d<f;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Yc.prototype=Object.create(Cn.prototype),Yc.prototype.constructor=Yc,Yc.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Yc.prototype.update=function(){var t=new Ye,e=new Ye;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Zc.prototype=Object.create(Ji.prototype),Zc.prototype.constructor=Zc,Zc.prototype.updateMatrixWorld=function(){var t=new Ye,e=new Xe,n=new Xe;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,Cn.prototype.updateMatrixWorld.call(this,r)}}(),Jc.prototype=Object.create(mr.prototype),Jc.prototype.constructor=Jc,Jc.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Jc.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Kc.prototype=Object.create(Cn.prototype),Kc.prototype.constructor=Kc,Kc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Kc.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qc.prototype=Object.create(Cn.prototype),Qc.prototype.constructor=Qc,Qc.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qc.prototype.update=function(){var t=new Ye,e=new gn,n=new gn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$c.prototype=Object.create(Ji.prototype),$c.prototype.constructor=$c,tu.prototype=Object.create(Ji.prototype),tu.prototype.constructor=tu,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,eu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ze;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,l=s.length;u<l;u++){var h=s[u],p=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(p).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nu.prototype=Object.create(Cn.prototype),nu.prototype.constructor=nu,nu.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nu.prototype.update=function(){var t=new Ye,e=new Ye,n=new Ye;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(n),this.targetLine.scale.z=n.length()}}(),ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,ru.prototype.update=function(){var t,e,n=new Ye,r=new Ln;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),l=0,h=c.length;l<h;l++)u.setXYZ(c[l],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,iu.prototype.update=function(){var t=new un;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),iu.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,ou.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),Cn.prototype.updateMatrixWorld.call(this,t))},au.prototype=Object.create(Zi.prototype),au.prototype.constructor=au,au.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.lookAt(this.plane.normal),Cn.prototype.updateMatrixWorld.call(this,t)},su.prototype=Object.create(Cn.prototype),su.prototype.constructor=su,su.prototype.setDirection=(Ac=new Ye,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(Ac.set(t.z,0,-t.x).normalize(),Sc=Math.acos(t.y),this.quaternion.setFromAxisAngle(Ac,Sc))}),su.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},su.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu;var lu=0,hu=1;function pu(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function du(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function fu(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new $i(t,e)}function mu(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ji(t)}function vu(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new $i(t,e)}function gu(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function yu(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function bu(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Qi(t)}function _u(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ye(t,e,n)}function xu(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Un(t,e).setDynamic(!0)}function wu(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Hn(t,e)}function Eu(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Bn(t,e)}function Tu(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new zn(t,e)}function Mu(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new kn(t,e)}function Su(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gn(t,e)}function Au(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jn(t,e)}function Ru(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Vn(t,e)}function Cu(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Wn(t,e)}function Lu(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Xn(t,e)}function Pu(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom",this.closed=!0}function Nu(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Ou(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Wa.call(this,t),this.type="catmullrom"}function Iu(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cu(t)}function Du(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new iu(t,e)}function Fu(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Ji(new ua(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Uu(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Ji(new io(t.geometry),new Yi({color:void 0!==e?e:16777215}))}function Hu(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Pa(t)}function Bu(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Oa(t)}Ua.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ua.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(rs.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new Fn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ye(i.x,i.y,i.z||0))}return e}}),Object.assign(is.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(Wa.prototype),Nu.prototype=Object.create(Wa.prototype),Ou.prototype=Object.create(Wa.prototype),Object.assign(Ou.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),$c.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Zc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Us.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Hs.extractUrlBase(t)}}),Object.assign(Wc.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(un.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),dr.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ve,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ve.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ve.ceilPowerOfTwo(t)}}),Object.assign(Ze.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Xe.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ye),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},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)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),hn.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},qe.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(pr.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(fr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(fr,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),fr.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),fr.getNormal(t,e,n,r)}}),Object.assign(os.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Zo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new aa(this,t)}}),Object.assign(We.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ye.prototype,{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(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(on.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Fn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(Cn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(Cn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Vi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Wi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ua.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Di.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(as.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(Un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Jo.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Oc.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ur.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===A}}}),Object.defineProperties(xa.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(hr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Hi.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Hi.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Li.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(an.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ui.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),hc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new sc).load(t,function(t){e.setBuffer(t)}),this},dc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},uc.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zu={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},ku={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Fa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Da;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}};function Gu(){console.error("THREE.Projector has been moved to /examples/js/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() is now raycaster.setFromCamera().")}}function ju(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}var Vu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function Wu(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){(function(e){const r=e.THREE=n(11);e.Zlib=n(10).Zlib,n(9),n(8),n(7),n(6),n(5),t.exports=r}).call(this,n(0))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t,r){var i;\n/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="__lodash_hash_undefined__",l=500,h="__lodash_placeholder__",p=1,d=2,f=4,m=1,v=2,g=1,y=2,b=4,_=8,x=16,w=32,E=64,T=128,M=256,S=512,A=30,R="...",C=800,L=16,P=1,N=2,O=1/0,I=9007199254740991,D=1.7976931348623157e308,F=NaN,U=4294967295,H=U-1,B=U>>>1,z=[["ary",T],["bind",g],["bindKey",y],["curry",_],["curryRight",x],["flip",S],["partial",w],["partialRight",E],["rearg",M]],k="[object Arguments]",G="[object Array]",j="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",X="[object DOMException]",q="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",J="[object Map]",K="[object Number]",Q="[object Null]",$="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ct="[object ArrayBuffer]",ut="[object DataView]",lt="[object Float32Array]",ht="[object Float64Array]",pt="[object Int8Array]",dt="[object Int16Array]",ft="[object Int32Array]",mt="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\\b__p \\+= \'\';/g,_t=/\\b(__p \\+=) \'\' \\+/g,xt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"\']/g,Tt=RegExp(wt.source),Mt=RegExp(Et.source),St=/<%-([\\s\\S]+?)%>/g,At=/<%([\\s\\S]+?)%>/g,Rt=/<%=([\\s\\S]+?)%>/g,Ct=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,Lt=/^\\w*$/,Pt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Nt=/[\\\\^$.*+?()[\\]{}|]/g,Ot=RegExp(Nt.source),It=/^\\s+|\\s+$/g,Dt=/^\\s+/,Ft=/\\s+$/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Ht=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Bt=/,? & /,zt=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,kt=/\\\\(\\\\)?/g,Gt=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,jt=/\\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Xt=/^\\[object .+?Constructor\\]$/,qt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\\d*)$/,Zt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Jt=/($^)/,Kt=/[\'\\n\\r\\u2028\\u2029\\\\]/g,Qt="\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff",$t="\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",te="[\\\\ud800-\\\\udfff]",ee="["+$t+"]",ne="["+Qt+"]",re="\\\\d+",ie="[\\\\u2700-\\\\u27bf]",oe="[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]",ae="[^\\\\ud800-\\\\udfff"+$t+re+"\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",se="\\\\ud83c[\\\\udffb-\\\\udfff]",ce="[^\\\\ud800-\\\\udfff]",ue="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",le="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",he="[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]",pe="(?:"+oe+"|"+ae+")",de="(?:"+he+"|"+ae+")",fe="(?:"+ne+"|"+se+")"+"?",me="[\\\\ufe0e\\\\ufe0f]?"+fe+("(?:\\\\u200d(?:"+[ce,ue,le].join("|")+")[\\\\ufe0e\\\\ufe0f]?"+fe+")*"),ve="(?:"+[ie,ue,le].join("|")+")"+me,ge="(?:"+[ce+ne+"?",ne,ue,le,te].join("|")+")",ye=RegExp("[\'\u2019]","g"),be=RegExp(ne,"g"),_e=RegExp(se+"(?="+se+")|"+ge+me,"g"),xe=RegExp([he+"?"+oe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ee,he,"$"].join("|")+")",de+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ee,he+pe,"$"].join("|")+")",he+"?"+pe+"+(?:[\'\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:[\'\u2019](?:D|LL|M|RE|S|T|VE))?","\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])","\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",re,ve].join("|"),"g"),we=RegExp("[\\\\u200d\\\\ud800-\\\\udfff"+Qt+"\\\\ufe0e\\\\ufe0f]"),Ee=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,Se={};Se[lt]=Se[ht]=Se[pt]=Se[dt]=Se[ft]=Se[mt]=Se[vt]=Se[gt]=Se[yt]=!0,Se[k]=Se[G]=Se[ct]=Se[V]=Se[ut]=Se[W]=Se[q]=Se[Y]=Se[J]=Se[K]=Se[$]=Se[et]=Se[nt]=Se[rt]=Se[at]=!1;var Ae={};Ae[k]=Ae[G]=Ae[ct]=Ae[ut]=Ae[V]=Ae[W]=Ae[lt]=Ae[ht]=Ae[pt]=Ae[dt]=Ae[ft]=Ae[J]=Ae[K]=Ae[$]=Ae[et]=Ae[nt]=Ae[rt]=Ae[it]=Ae[mt]=Ae[vt]=Ae[gt]=Ae[yt]=!0,Ae[q]=Ae[Y]=Ae[at]=!1;var Re={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},Ce=parseFloat,Le=parseInt,Pe="object"==typeof t&&t&&t.Object===Object&&t,Ne="object"==typeof self&&self&&self.Object===Object&&self,Oe=Pe||Ne||Function("return this")(),Ie="object"==typeof e&&e&&!e.nodeType&&e,De=Ie&&"object"==typeof r&&r&&!r.nodeType&&r,Fe=De&&De.exports===Ie,Ue=Fe&&Pe.process,He=function(){try{var t=De&&De.require&&De.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch(t){}}(),Be=He&&He.isArrayBuffer,ze=He&&He.isDate,ke=He&&He.isMap,Ge=He&&He.isRegExp,je=He&&He.isSet,Ve=He&&He.isTypedArray;function We(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ye(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ke(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Qe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $e(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function tn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function en(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function nn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function rn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=pn("length");function an(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function sn(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cn(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):sn(t,ln,n)}function un(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function ln(t){return t!=t}function hn(t,e){var n=null==t?0:t.length;return n?mn(t,e)/n:F}function pn(t){return function(e){return null==e?o:e[t]}}function dn(t){return function(e){return null==t?o:t[e]}}function fn(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function mn(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function vn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function yn(t,e){return $e(e,function(e){return t[e]})}function bn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function xn(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var wn=dn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"\'n","\u017f":"s"}),En=dn({"&":"&amp;","<":"&lt;",">":"&gt;",\'"\':"&quot;","\'":"&#39;"});function Tn(t){return"\\\\"+Re[t]}function Mn(t){return we.test(t)}function Sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==h||(t[n]=h,o[i++]=n)}return o}function Cn(t,e){return"__proto__"==e?o:t[e]}function Ln(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Nn(t){return Mn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):on(t)}function On(t){return Mn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var In=dn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":\'"\',"&#39;":"\'"});var Dn=function t(e){var n,r=(e=null==e?Oe:Dn.defaults(Oe.Object(),e,Dn.pick(Oe,Te))).Array,i=e.Date,Qt=e.Error,$t=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,ae=$t.prototype,se=ee.prototype,ce=e["__core-js_shared__"],ue=ae.toString,le=se.hasOwnProperty,he=0,pe=(n=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",de=se.toString,fe=ue.call(ee),me=Oe._,ve=ne("^"+ue.call(le).replace(Nt,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,_e=e.Symbol,we=e.Uint8Array,Re=ge?ge.allocUnsafe:o,Pe=An(ee.getPrototypeOf,ee),Ne=ee.create,Ie=se.propertyIsEnumerable,De=oe.splice,Ue=_e?_e.isConcatSpreadable:o,He=_e?_e.iterator:o,on=_e?_e.toStringTag:o,dn=function(){try{var t=zo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),Fn=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,Un=i&&i.now!==Oe.Date.now&&i.now,Hn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Bn=te.ceil,zn=te.floor,kn=ee.getOwnPropertySymbols,Gn=ge?ge.isBuffer:o,jn=e.isFinite,Vn=oe.join,Wn=An(ee.keys,ee),Xn=te.max,qn=te.min,Yn=i.now,Zn=e.parseInt,Jn=te.random,Kn=oe.reverse,Qn=zo(e,"DataView"),$n=zo(e,"Map"),tr=zo(e,"Promise"),er=zo(e,"Set"),nr=zo(e,"WeakMap"),rr=zo(ee,"create"),ir=nr&&new nr,or={},ar=ha(Qn),sr=ha($n),cr=ha(tr),ur=ha(er),lr=ha(nr),hr=_e?_e.prototype:o,pr=hr?hr.valueOf:o,dr=hr?hr.toString:o;function fr(t){if(Rs(t)&&!gs(t)&&!(t instanceof yr)){if(t instanceof gr)return t;if(le.call(t,"__wrapped__"))return pa(t)}return new gr(t)}var mr=function(){function t(){}return function(e){if(!As(e))return{};if(Ne)return Ne(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function vr(){}function gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function wr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new xr;++e<n;)this.add(t[e])}function Er(t){var e=this.__data__=new _r(t);this.size=e.size}function Tr(t,e){var n=gs(t),r=!n&&vs(t),i=!n&&!r&&xs(t),o=!n&&!r&&!i&&Fs(t),a=n||r||i||o,s=a?vn(t.length,re):[],c=s.length;for(var u in t)!e&&!le.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qo(u,c))||s.push(u);return s}function Mr(t){var e=t.length;return e?t[wi(0,e-1)]:o}function Sr(t,e){return ca(ro(t),Dr(e,0,t.length))}function Ar(t){return ca(ro(t))}function Rr(t,e,n){(n===o||ds(t[e],n))&&(n!==o||e in t)||Or(t,e,n)}function Cr(t,e,n){var r=t[e];le.call(t,e)&&ds(r,n)&&(n!==o||e in t)||Or(t,e,n)}function Lr(t,e){for(var n=t.length;n--;)if(ds(t[n][0],e))return n;return-1}function Pr(t,e,n,r){return zr(t,function(t,i,o){e(r,t,n(t),o)}),r}function Nr(t,e){return t&&io(e,ic(e),t)}function Or(t,e,n){"__proto__"==e&&dn?dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ir(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:$s(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,a){var s,c=e&p,u=e&d,l=e&f;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!As(t))return t;var h=gs(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&le.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!c)return ro(t,s)}else{var m=jo(t),v=m==Y||m==Z;if(xs(t))return Ki(t,c);if(m==$||m==k||v&&!i){if(s=u||v?{}:Wo(t),!c)return u?function(t,e){return io(t,Go(t),e)}(t,function(t,e){return t&&io(e,oc(e),t)}(s,t)):function(t,e){return io(t,ko(t),e)}(t,Nr(s,t))}else{if(!Ae[m])return i?t:{};s=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case ct:return Qi(t);case V:case W:return new a(+t);case ut:return function(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case lt:case ht:case pt:case dt:case ft:case mt:case vt:case gt:case yt:return $i(t,n);case J:return new a;case K:case rt:return new a(t);case et:return(o=new(i=t).constructor(i.source,jt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new a;case it:return r=t,pr?ee(pr.call(r)):{}}}(t,m,c)}}a||(a=new Er);var g=a.get(t);if(g)return g;if(a.set(t,s),Os(t))return t.forEach(function(r){s.add(Fr(r,e,n,r,t,a))}),s;if(Cs(t))return t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,a))}),s;var y=h?o:(l?u?Oo:No:u?oc:ic)(t);return qe(y||t,function(r,i){y&&(r=t[i=r]),Cr(s,i,Fr(r,e,n,i,t,a))}),s}function Ur(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function Hr(t,e,n){if("function"!=typeof t)throw new ie(c);return ia(function(){t.apply(o,n)},e)}function Br(t,e,n,r){var i=-1,o=Ke,s=!0,c=t.length,u=[],l=e.length;if(!c)return u;n&&(e=$e(e,gn(n))),r?(o=Qe,s=!1):e.length>=a&&(o=bn,s=!1,e=new wr(e));t:for(;++i<c;){var h=t[i],p=null==n?h:n(h);if(h=r||0!==h?h:0,s&&p==p){for(var d=l;d--;)if(e[d]===p)continue t;u.push(h)}else o(e,p,r)||u.push(h)}return u}fr.templateSettings={escape:St,evaluate:At,interpolate:Rt,variable:"",imports:{_:fr}},fr.prototype=vr.prototype,fr.prototype.constructor=fr,gr.prototype=mr(vr.prototype),gr.prototype.constructor=gr,yr.prototype=mr(vr.prototype),yr.prototype.constructor=yr,br.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},br.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},br.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===u?o:n}return le.call(e,t)?e[t]:o},br.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==o:le.call(e,t)},br.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===o?u:e,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=Lr(e,t);return!(n<0||(n==e.length-1?e.pop():De.call(e,n,1),--this.size,0))},_r.prototype.get=function(t){var e=this.__data__,n=Lr(e,t);return n<0?o:e[n][1]},_r.prototype.has=function(t){return Lr(this.__data__,t)>-1},_r.prototype.set=function(t,e){var n=this.__data__,r=Lr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},xr.prototype.clear=function(){this.size=0,this.__data__={hash:new br,map:new($n||_r),string:new br}},xr.prototype.delete=function(t){var e=Ho(this,t).delete(t);return this.size-=e?1:0,e},xr.prototype.get=function(t){return Ho(this,t).get(t)},xr.prototype.has=function(t){return Ho(this,t).has(t)},xr.prototype.set=function(t,e){var n=Ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,u),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!$n||r.length<a-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xr(r)}return n.set(t,e),this.size=n.size,this};var zr=so(Yr),kr=so(Zr,!0);function Gr(t,e){var n=!0;return zr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(c===o?s==s&&!Ds(s):n(s,c)))var c=s,u=a}return u}function Vr(t,e){var n=[];return zr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Xo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):tn(i,s):r||(i[i.length]=s)}return i}var Xr=co(),qr=co(!0);function Yr(t,e){return t&&Xr(t,e,ic)}function Zr(t,e){return t&&qr(t,e,ic)}function Jr(t,e){return Je(e,function(e){return Ts(t[e])})}function Kr(t,e){for(var n=0,r=(e=qi(e,t)).length;null!=t&&n<r;)t=t[la(e[n++])];return n&&n==r?t:o}function Qr(t,e,n){var r=e(t);return gs(t)?r:tn(r,n(t))}function $r(t){return null==t?t===o?ot:Q:on&&on in ee(t)?function(t){var e=le.call(t,on),n=t[on];try{t[on]=o;var r=!0}catch(t){}var i=de.call(t);return r&&(e?t[on]=n:delete t[on]),i}(t):function(t){return de.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&le.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Qe:Ke,a=t[0].length,s=t.length,c=s,u=r(s),l=1/0,h=[];c--;){var p=t[c];c&&e&&(p=$e(p,gn(e))),l=qn(p.length,l),u[c]=!n&&(e||a>=120&&p.length>=120)?new wr(c&&p):o}p=t[0];var d=-1,f=u[0];t:for(;++d<a&&h.length<l;){var m=p[d],v=e?e(m):m;if(m=n||0!==m?m:0,!(f?bn(f,v):i(h,v,n))){for(c=s;--c;){var g=u[c];if(!(g?bn(g,v):i(t[c],v,n)))continue t}f&&f.push(v),h.push(m)}}return h}function ii(t,e,n){var r=null==(t=na(t,e=qi(e,t)))?t:t[la(Ea(e))];return null==r?o:We(r,t,n)}function oi(t){return Rs(t)&&$r(t)==k}function ai(t,e,n,r,i){return t===e||(null==t||null==e||!Rs(t)&&!Rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=gs(t),c=gs(e),u=s?G:jo(t),l=c?G:jo(e),h=(u=u==k?$:u)==$,p=(l=l==k?$:l)==$,d=u==l;if(d&&xs(t)){if(!xs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Er),s||Fs(t)?Lo(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case ut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case V:case W:case K:return ds(+t,+e);case q:return t.name==e.name&&t.message==e.message;case et:case rt:return t==e+"";case J:var s=Sn;case nt:var c=r&m;if(s||(s=Ln),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=v,a.set(t,e);var l=Lo(s(t),s(e),r,i,o,a);return a.delete(t),l;case it:if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(n&m)){var f=h&&le.call(t,"__wrapped__"),g=p&&le.call(e,"__wrapped__");if(f||g){var y=f?t.value():t,b=g?e.value():e;return a||(a=new Er),i(y,b,n,r,a)}}return!!d&&(a||(a=new Er),function(t,e,n,r,i,a){var s=n&m,c=No(t),u=c.length,l=No(e).length;if(u!=l&&!s)return!1;for(var h=u;h--;){var p=c[h];if(!(s?p in e:le.call(e,p)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var f=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<u;){p=c[h];var g=t[p],y=e[p];if(r)var b=s?r(y,g,p,e,t,a):r(g,y,p,t,e,a);if(!(b===o?g===y||i(g,y,n,r,a):b)){f=!1;break}v||(v="constructor"==p)}if(f&&!v){var _=t.constructor,x=e.constructor;_!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}(t,e,n,r,ai,i))}function si(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=ee(t);i--;){var c=n[i];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<a;){var u=(c=n[i])[0],l=t[u],h=c[1];if(s&&c[2]){if(l===o&&!(u in t))return!1}else{var p=new Er;if(r)var d=r(l,h,u,t,e,p);if(!(d===o?ai(h,l,m|v,r,p):d))return!1}}return!0}function ci(t){return!(!As(t)||pe&&pe in t)&&(Ts(t)?ve:Xt).test(ha(t))}function ui(t){return"function"==typeof t?t:null==t?Lc:"object"==typeof t?gs(t)?mi(t[0],t[1]):fi(t):Bc(t)}function li(t){if(!Qo(t))return Wn(t);var e=[];for(var n in ee(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hi(t){if(!As(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Qo(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function pi(t,e){return t<e}function di(t,e){var n=-1,i=bs(t)?r(t.length):[];return zr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function fi(t){var e=Bo(t);return 1==e.length&&e[0][2]?ta(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function mi(t,e){return Zo(t)&&$o(e)?ta(la(t),e):function(n){var r=$s(n,t);return r===o&&r===e?tc(n,t):ai(e,r,m|v)}}function vi(t,e,n,r,i){t!==e&&Xr(e,function(a,s){if(As(a))i||(i=new Er),function(t,e,n,r,i,a,s){var c=Cn(t,n),u=Cn(e,n),l=s.get(u);if(l)Rr(t,n,l);else{var h=a?a(c,u,n+"",t,e,s):o,p=h===o;if(p){var d=gs(u),f=!d&&xs(u),m=!d&&!f&&Fs(u);h=u,d||f||m?gs(c)?h=c:_s(c)?h=ro(c):f?(p=!1,h=Ki(u,!0)):m?(p=!1,h=$i(u,!0)):h=[]:Ps(u)||vs(u)?(h=c,vs(c)?h=Vs(c):(!As(c)||r&&Ts(c))&&(h=Wo(u))):p=!1}p&&(s.set(u,h),i(h,u,r,a,s),s.delete(u)),Rr(t,n,h)}}(t,e,s,n,vi,r,i);else{var c=r?r(Cn(t,s),a,s+"",t,e,i):o;c===o&&(c=a),Rr(t,s,c)}},oc)}function gi(t,e){var n=t.length;if(n)return qo(e+=e<0?n:0,n)?t[e]:o}function yi(t,e,n){var r=-1;return e=$e(e.length?e:[Lc],gn(Uo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:$e(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var c=to(i[r],o[r]);if(c){if(r>=s)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)})}function bi(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Kr(t,a);n(s,a)&&Ai(o,qi(a,t),s)}return o}function _i(t,e,n,r){var i=r?un:cn,o=-1,a=e.length,s=t;for(t===e&&(e=ro(e)),n&&(s=$e(t,gn(n)));++o<a;)for(var c=0,u=e[o],l=n?n(u):u;(c=i(s,l,c,r))>-1;)s!==t&&De.call(s,c,1),De.call(t,c,1);return t}function xi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;qo(i)?De.call(t,i,1):Bi(t,i)}}return t}function wi(t,e){return t+zn(Jn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>I)return n;do{e%2&&(n+=t),(e=zn(e/2))&&(t+=t)}while(e);return n}function Ti(t,e){return oa(ea(t,e,Lc),t+"")}function Mi(t){return Mr(dc(t))}function Si(t,e){var n=dc(t);return ca(n,Dr(e,0,n.length))}function Ai(t,e,n,r){if(!As(t))return t;for(var i=-1,a=(e=qi(e,t)).length,s=a-1,c=t;null!=c&&++i<a;){var u=la(e[i]),l=n;if(i!=s){var h=c[u];(l=r?r(h,u,c):o)===o&&(l=As(h)?h:qo(e[i+1])?[]:{})}Cr(c,u,l),c=c[u]}return t}var Ri=ir?function(t,e){return ir.set(t,e),t}:Lc,Ci=dn?function(t,e){return dn(t,"toString",{configurable:!0,enumerable:!1,value:Ac(e),writable:!0})}:Lc;function Li(t){return ca(dc(t))}function Pi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Ni(t,e){var n;return zr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Oi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=B){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Ds(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return Ii(t,e,Lc,n)}function Ii(t,e,n,r){e=n(e);for(var i=0,a=null==t?0:t.length,s=e!=e,c=null===e,u=Ds(e),l=e===o;i<a;){var h=zn((i+a)/2),p=n(t[h]),d=p!==o,f=null===p,m=p==p,v=Ds(p);if(s)var g=r||m;else g=l?m&&(r||d):c?m&&d&&(r||!f):u?m&&d&&!f&&(r||!v):!f&&!v&&(r?p<=e:p<e);g?i=h+1:a=h}return qn(a,H)}function Di(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!ds(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ds(t)?F:+t}function Ui(t){if("string"==typeof t)return t;if(gs(t))return $e(t,Ui)+"";if(Ds(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Hi(t,e,n){var r=-1,i=Ke,o=t.length,s=!0,c=[],u=c;if(n)s=!1,i=Qe;else if(o>=a){var l=e?null:To(t);if(l)return Ln(l);s=!1,i=bn,u=new wr}else u=e?[]:c;t:for(;++r<o;){var h=t[r],p=e?e(h):h;if(h=n||0!==h?h:0,s&&p==p){for(var d=u.length;d--;)if(u[d]===p)continue t;e&&u.push(p),c.push(h)}else i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}function Bi(t,e){return null==(t=na(t,e=qi(e,t)))||delete t[la(Ea(e))]}function zi(t,e,n,r){return Ai(t,e,n(Kr(t,e)),r)}function ki(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Pi(t,r?0:o,r?o+1:i):Pi(t,r?o+1:0,r?i:o)}function Gi(t,e){var n=t;return n instanceof yr&&(n=n.value()),en(e,function(t,e){return e.func.apply(e.thisArg,tn([t],e.args))},n)}function ji(t,e,n){var i=t.length;if(i<2)return i?Hi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],c=-1;++c<i;)c!=o&&(a[o]=Br(a[o]||s,t[c],e,n));return Hi(Wr(a,1),e,n)}function Vi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var c=r<a?e[r]:o;n(s,t[r],c)}return s}function Wi(t){return _s(t)?t:[]}function Xi(t){return"function"==typeof t?t:Lc}function qi(t,e){return gs(t)?t:Zo(t,e)?[t]:ua(Ws(t))}var Yi=Ti;function Zi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:Pi(t,e,n)}var Ji=Fn||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Re?Re(n):new t.constructor(n);return t.copy(r),r}function Qi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function $i(t,e){var n=e?Qi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function to(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=Ds(t),s=e!==o,c=null===e,u=e==e,l=Ds(e);if(!c&&!l&&!a&&t>e||a&&s&&u&&!c&&!l||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!l&&t<e||l&&n&&i&&!r&&!a||c&&n&&i||!s&&i||!u)return-1}return 0}function eo(t,e,n,i){for(var o=-1,a=t.length,s=n.length,c=-1,u=e.length,l=Xn(a-s,0),h=r(u+l),p=!i;++c<u;)h[c]=e[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=t[o]);for(;l--;)h[c++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,c=n.length,u=-1,l=e.length,h=Xn(a-c,0),p=r(h+l),d=!i;++o<h;)p[o]=t[o];for(var f=o;++u<l;)p[f+u]=e[u];for(;++s<c;)(d||o<a)&&(p[f+n[s]]=t[o++]);return p}function ro(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function io(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=r?r(n[c],t[c],c,n,t):o;u===o&&(u=t[c]),i?Or(n,c,u):Cr(n,c,u)}return n}function oo(t,e){return function(n,r){var i=gs(n)?Xe:Pr,o=e?e():{};return i(n,t,Uo(r,2),o)}}function ao(t){return Ti(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&Yo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++r<i;){var c=n[r];c&&t(e,c,r,a)}return e})}function so(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=ee(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function co(t){return function(e,n,r){for(var i=-1,o=ee(e),a=r(e),s=a.length;s--;){var c=a[t?s:++i];if(!1===n(o[c],c,o))break}return e}}function uo(t){return function(e){var n=Mn(e=Ws(e))?On(e):o,r=n?n[0]:e.charAt(0),i=n?Zi(n,1).join(""):e.slice(1);return r[t]()+i}}function lo(t){return function(e){return en(Tc(vc(e).replace(ye,"")),t,"")}}function ho(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=mr(t.prototype),r=t.apply(n,e);return As(r)?r:n}}function po(t){return function(e,n,r){var i=ee(e);if(!bs(e)){var a=Uo(n,3);e=ic(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function fo(t){return Po(function(e){var n=e.length,r=n,i=gr.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new ie(c);if(i&&!s&&"wrapper"==Do(a))var s=new gr([],!0)}for(r=s?r:n;++r<n;){var u=Do(a=e[r]),l="wrapper"==u?Io(a):o;s=l&&Jo(l[0])&&l[1]==(T|_|w|M)&&!l[4].length&&1==l[9]?s[Do(l[0])].apply(s,l[3]):1==a.length&&Jo(a)?s[u]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&gs(r))return s.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function mo(t,e,n,i,a,s,c,u,l,h){var p=e&T,d=e&g,f=e&y,m=e&(_|x),v=e&S,b=f?o:ho(t);return function g(){for(var y=arguments.length,_=r(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Fo(g),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,w);if(i&&(_=eo(_,i,a,m)),s&&(_=no(_,s,c,m)),y-=E,m&&y<h){var T=Rn(_,w);return wo(t,e,mo,g.placeholder,n,_,T,u,l,h-y)}var M=d?n:this,S=f?M[t]:t;return y=_.length,u?_=function(t,e){for(var n=t.length,r=qn(e.length,n),i=ro(t);r--;){var a=e[r];t[r]=qo(a,n)?i[a]:o}return t}(_,u):v&&y>1&&_.reverse(),p&&l<y&&(_.length=l),this&&this!==Oe&&this instanceof g&&(S=b||ho(S)),S.apply(M,_)}}function vo(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function go(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ui(n),r=Ui(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function yo(t){return Po(function(e){return e=$e(e,gn(Uo())),Ti(function(n){var r=this;return t(e,function(t){return We(t,r,n)})})})}function bo(t,e){var n=(e=e===o?" ":Ui(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,Bn(t/Nn(e)));return Mn(e)?Zi(On(r),0,t).join(""):r.slice(0,t)}function _o(t){return function(e,n,i){return i&&"number"!=typeof i&&Yo(e,n,i)&&(n=i=o),e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n,i){for(var o=-1,a=Xn(Bn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:zs(i),t)}}function xo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=js(e),n=js(n)),t(e,n)}}function wo(t,e,n,r,i,a,s,c,u,l){var h=e&_;e|=h?w:E,(e&=~(h?E:w))&b||(e&=~(g|y));var p=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,c,u,l],d=n.apply(o,p);return Jo(t)&&ra(d,p),d.placeholder=r,aa(d,t,e)}function Eo(t){var e=te[t];return function(t,n){if(t=js(t),n=null==n?0:qn(ks(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var To=er&&1/Ln(new er([,-0]))[1]==O?function(t){return new er(t)}:Dc;function Mo(t){return function(e){var n=jo(e);return n==J?Sn(e):n==nt?Pn(e):function(t,e){return $e(e,function(e){return[e,t[e]]})}(e,t(e))}}function So(t,e,n,i,a,s,u,l){var p=e&y;if(!p&&"function"!=typeof t)throw new ie(c);var d=i?i.length:0;if(d||(e&=~(w|E),i=a=o),u=u===o?u:Xn(ks(u),0),l=l===o?l:ks(l),d-=a?a.length:0,e&E){var f=i,m=a;i=a=o}var v=p?o:Io(t),S=[t,e,n,i,a,f,m,s,u,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(g|y|T),a=r==T&&n==_||r==T&&n==M&&t[7].length<=e[8]||r==(T|M)&&e[7].length<=e[8]&&n==_;if(!o&&!a)return t;r&g&&(t[2]=e[2],i|=n&g?0:b);var s=e[3];if(s){var c=t[3];t[3]=c?eo(c,s,e[4]):s,t[4]=c?Rn(t[3],h):e[4]}(s=e[5])&&(c=t[5],t[5]=c?no(c,s,e[6]):s,t[6]=c?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&T&&(t[8]=null==t[8]?e[8]:qn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(l=S[9]=S[9]===o?p?0:t.length:Xn(S[9]-d,0))&&e&(_|x)&&(e&=~(_|x)),e&&e!=g)A=e==_||e==x?function(t,e,n){var i=ho(t);return function a(){for(var s=arguments.length,c=r(s),u=s,l=Fo(a);u--;)c[u]=arguments[u];var h=s<3&&c[0]!==l&&c[s-1]!==l?[]:Rn(c,l);return(s-=h.length)<n?wo(t,e,mo,a.placeholder,o,c,h,o,o,n-s):We(this&&this!==Oe&&this instanceof a?i:t,this,c)}}(t,e,l):e!=w&&e!=(g|w)||a.length?mo.apply(o,S):function(t,e,n,i){var o=e&g,a=ho(t);return function e(){for(var s=-1,c=arguments.length,u=-1,l=i.length,h=r(l+c),p=this&&this!==Oe&&this instanceof e?a:t;++u<l;)h[u]=i[u];for(;c--;)h[u++]=arguments[++s];return We(p,o?n:this,h)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=ho(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return aa((v?Ri:ra)(A,S),t,e)}function Ao(t,e,n,r){return t===o||ds(t,se[n])&&!le.call(r,n)?e:t}function Ro(t,e,n,r,i,a){return As(t)&&As(e)&&(a.set(e,t),vi(t,e,o,Ro,a),a.delete(e)),t}function Co(t){return Ps(t)?o:t}function Lo(t,e,n,r,i,a){var s=n&m,c=t.length,u=e.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var h=-1,p=!0,d=n&v?new wr:o;for(a.set(t,e),a.set(e,t);++h<c;){var f=t[h],g=e[h];if(r)var y=s?r(g,f,h,e,t,a):r(f,g,h,t,e,a);if(y!==o){if(y)continue;p=!1;break}if(d){if(!rn(e,function(t,e){if(!bn(d,e)&&(f===t||i(f,t,n,r,a)))return d.push(e)})){p=!1;break}}else if(f!==g&&!i(f,g,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Po(t){return oa(ea(t,o,ya),t+"")}function No(t){return Qr(t,ic,ko)}function Oo(t){return Qr(t,oc,Go)}var Io=ir?function(t){return ir.get(t)}:Dc;function Do(t){for(var e=t.name+"",n=or[e],r=le.call(or,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(le.call(fr,"placeholder")?fr:t).placeholder}function Uo(){var t=fr.iteratee||Pc;return t=t===Pc?ui:t,arguments.length?t(arguments[0],arguments[1]):t}function Ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bo(t){for(var e=ic(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$o(i)]}return e}function zo(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return ci(n)?n:o}var ko=kn?function(t){return null==t?[]:(t=ee(t),Je(kn(t),function(e){return Ie.call(t,e)}))}:Gc,Go=kn?function(t){for(var e=[];t;)tn(e,ko(t)),t=Pe(t);return e}:Gc,jo=$r;function Vo(t,e,n){for(var r=-1,i=(e=qi(e,t)).length,o=!1;++r<i;){var a=la(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ss(i)&&qo(a,i)&&(gs(t)||vs(t))}function Wo(t){return"function"!=typeof t.constructor||Qo(t)?{}:mr(Pe(t))}function Xo(t){return gs(t)||vs(t)||!!(Ue&&t&&t[Ue])}function qo(t,e){var n=typeof t;return!!(e=null==e?I:e)&&("number"==n||"symbol"!=n&&Yt.test(t))&&t>-1&&t%1==0&&t<e}function Yo(t,e,n){if(!As(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qo(e,n.length):"string"==r&&e in n)&&ds(n[e],t)}function Zo(t,e){if(gs(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Lt.test(t)||!Ct.test(t)||null!=e&&t in ee(e)}function Jo(t){var e=Do(t),n=fr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Io(n);return!!r&&t===r[0]}(Qn&&jo(new Qn(new ArrayBuffer(1)))!=ut||$n&&jo(new $n)!=J||tr&&"[object Promise]"!=jo(tr.resolve())||er&&jo(new er)!=nt||nr&&jo(new nr)!=at)&&(jo=function(t){var e=$r(t),n=e==$?t.constructor:o,r=n?ha(n):"";if(r)switch(r){case ar:return ut;case sr:return J;case cr:return"[object Promise]";case ur:return nt;case lr:return at}return e});var Ko=ce?Ts:jc;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function $o(t){return t==t&&!As(t)}function ta(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in ee(n))}}function ea(t,e,n){return e=Xn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=Xn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var c=r(e+1);++o<e;)c[o]=i[o];return c[e]=n(s),We(t,this,c)}}function na(t,e){return e.length<2?t:Kr(t,Pi(e,0,-1))}var ra=sa(Ri),ia=Hn||function(t,e){return Oe.setTimeout(t,e)},oa=sa(Ci);function aa(t,e,n){var r=e+"";return oa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\\n/* [wrapped with "+e+"] */\\n")}(r,function(t,e){return qe(z,function(n){var r="_."+n[0];e&n[1]&&!Ke(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}(r),n)))}function sa(t){var e=0,n=0;return function(){var r=Yn(),i=L-(r-n);if(n=r,i>0){if(++e>=C)return arguments[0]}else e=0;return t.apply(o,arguments)}}function ca(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=wi(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var ua=function(t){var e=ss(t,function(t){return n.size===l&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pt,function(t,n,r,i){e.push(r?i.replace(kt,"$1"):n||t)}),e});function la(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ha(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function pa(t){if(t instanceof yr)return t.clone();var e=new gr(t.__wrapped__,t.__chain__);return e.__actions__=ro(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var da=Ti(function(t,e){return _s(t)?Br(t,Wr(e,1,_s,!0)):[]}),fa=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),Uo(n,2)):[]}),ma=Ti(function(t,e){var n=Ea(e);return _s(n)&&(n=o),_s(t)?Br(t,Wr(e,1,_s,!0),o,n):[]});function va(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),sn(t,Uo(e,3),i)}function ga(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ks(n),i=n<0?Xn(r+i,0):qn(i,r-1)),sn(t,Uo(e,3),i,!0)}function ya(t){return null!=t&&t.length?Wr(t,1):[]}function ba(t){return t&&t.length?t[0]:o}var _a=Ti(function(t){var e=$e(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),xa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return e===Ea(n)?e=o:n.pop(),n.length&&n[0]===t[0]?ri(n,Uo(e,2)):[]}),wa=Ti(function(t){var e=Ea(t),n=$e(t,Wi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?ri(n,o,e):[]});function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ta=Ti(Ma);function Ma(t,e){return t&&t.length&&e&&e.length?_i(t,e):t}var Sa=Po(function(t,e){var n=null==t?0:t.length,r=Ir(t,e);return xi(t,$e(e,function(t){return qo(t,n)?+t:t}).sort(to)),r});function Aa(t){return null==t?t:Kn.call(t)}var Ra=Ti(function(t){return Hi(Wr(t,1,_s,!0))}),Ca=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),Hi(Wr(t,1,_s,!0),Uo(e,2))}),La=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,Hi(Wr(t,1,_s,!0),o,e)});function Pa(t){if(!t||!t.length)return[];var e=0;return t=Je(t,function(t){if(_s(t))return e=Xn(t.length,e),!0}),vn(e,function(e){return $e(t,pn(e))})}function Na(t,e){if(!t||!t.length)return[];var n=Pa(t);return null==e?n:$e(n,function(t){return We(e,o,t)})}var Oa=Ti(function(t,e){return _s(t)?Br(t,e):[]}),Ia=Ti(function(t){return ji(Je(t,_s))}),Da=Ti(function(t){var e=Ea(t);return _s(e)&&(e=o),ji(Je(t,_s),Uo(e,2))}),Fa=Ti(function(t){var e=Ea(t);return e="function"==typeof e?e:o,ji(Je(t,_s),o,e)}),Ua=Ti(Pa);var Ha=Ti(function(t){var e=t.length,n=e>1?t[e-1]:o;return Na(t,n="function"==typeof n?(t.pop(),n):o)});function Ba(t){var e=fr(t);return e.__chain__=!0,e}function za(t,e){return e(t)}var ka=Po(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:za,args:[i],thisArg:o}),new gr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Ga=oo(function(t,e,n){le.call(t,n)?++t[n]:Or(t,n,1)});var ja=po(va),Va=po(ga);function Wa(t,e){return(gs(t)?qe:zr)(t,Uo(e,3))}function Xa(t,e){return(gs(t)?Ye:kr)(t,Uo(e,3))}var qa=oo(function(t,e,n){le.call(t,n)?t[n].push(e):Or(t,n,[e])});var Ya=Ti(function(t,e,n){var i=-1,o="function"==typeof e,a=bs(t)?r(t.length):[];return zr(t,function(t){a[++i]=o?We(e,t,n):ii(t,e,n)}),a}),Za=oo(function(t,e,n){Or(t,n,e)});function Ja(t,e){return(gs(t)?$e:di)(t,Uo(e,3))}var Ka=oo(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Qa=Ti(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Yo(t,e[0],e[1])?e=[]:n>2&&Yo(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Wr(e,1),[])}),$a=Un||function(){return Oe.Date.now()};function ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,So(t,T,o,o,o,o,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ns=Ti(function(t,e,n){var r=g;if(n.length){var i=Rn(n,Fo(ns));r|=w}return So(t,r,e,n,i)}),rs=Ti(function(t,e,n){var r=g|y;if(n.length){var i=Rn(n,Fo(rs));r|=w}return So(e,r,t,n,i)});function is(t,e,n){var r,i,a,s,u,l,h=0,p=!1,d=!1,f=!0;if("function"!=typeof t)throw new ie(c);function m(e){var n=r,a=i;return r=i=o,h=e,s=t.apply(a,n)}function v(t){var n=t-l;return l===o||n>=e||n<0||d&&t-h>=a}function g(){var t=$a();if(v(t))return y(t);u=ia(g,function(t){var n=e-(t-l);return d?qn(n,a-(t-h)):n}(t))}function y(t){return u=o,f&&r?m(t):(r=i=o,s)}function b(){var t=$a(),n=v(t);if(r=arguments,i=this,l=t,n){if(u===o)return function(t){return h=t,u=ia(g,e),p?m(t):s}(l);if(d)return u=ia(g,e),m(l)}return u===o&&(u=ia(g,e)),s}return e=js(e)||0,As(n)&&(p=!!n.leading,a=(d="maxWait"in n)?Xn(js(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==o&&Ji(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:y($a())},b}var os=Ti(function(t,e){return Hr(t,1,e)}),as=Ti(function(t,e,n){return Hr(t,js(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ss.Cache||xr),n}function cs(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=xr;var us=Yi(function(t,e){var n=(e=1==e.length&&gs(e[0])?$e(e[0],gn(Uo())):$e(Wr(e,1),gn(Uo()))).length;return Ti(function(r){for(var i=-1,o=qn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return We(t,this,r)})}),ls=Ti(function(t,e){var n=Rn(e,Fo(ls));return So(t,w,o,e,n)}),hs=Ti(function(t,e){var n=Rn(e,Fo(hs));return So(t,E,o,e,n)}),ps=Po(function(t,e){return So(t,M,o,o,o,e)});function ds(t,e){return t===e||t!=t&&e!=e}var fs=xo(ti),ms=xo(function(t,e){return t>=e}),vs=oi(function(){return arguments}())?oi:function(t){return Rs(t)&&le.call(t,"callee")&&!Ie.call(t,"callee")},gs=r.isArray,ys=Be?gn(Be):function(t){return Rs(t)&&$r(t)==ct};function bs(t){return null!=t&&Ss(t.length)&&!Ts(t)}function _s(t){return Rs(t)&&bs(t)}var xs=Gn||jc,ws=ze?gn(ze):function(t){return Rs(t)&&$r(t)==W};function Es(t){if(!Rs(t))return!1;var e=$r(t);return e==q||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Ps(t)}function Ts(t){if(!As(t))return!1;var e=$r(t);return e==Y||e==Z||e==j||e==tt}function Ms(t){return"number"==typeof t&&t==ks(t)}function Ss(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=I}function As(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Rs(t){return null!=t&&"object"==typeof t}var Cs=ke?gn(ke):function(t){return Rs(t)&&jo(t)==J};function Ls(t){return"number"==typeof t||Rs(t)&&$r(t)==K}function Ps(t){if(!Rs(t)||$r(t)!=$)return!1;var e=Pe(t);if(null===e)return!0;var n=le.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==fe}var Ns=Ge?gn(Ge):function(t){return Rs(t)&&$r(t)==et};var Os=je?gn(je):function(t){return Rs(t)&&jo(t)==nt};function Is(t){return"string"==typeof t||!gs(t)&&Rs(t)&&$r(t)==rt}function Ds(t){return"symbol"==typeof t||Rs(t)&&$r(t)==it}var Fs=Ve?gn(Ve):function(t){return Rs(t)&&Ss(t.length)&&!!Se[$r(t)]};var Us=xo(pi),Hs=xo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(bs(t))return Is(t)?On(t):ro(t);if(He&&t[He])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[He]());var e=jo(t);return(e==J?Sn:e==nt?Ln:dc)(t)}function zs(t){return t?(t=js(t))===O||t===-O?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function ks(t){var e=zs(t),n=e%1;return e==e?n?e-n:e:0}function Gs(t){return t?Dr(ks(t),0,U):0}function js(t){if("number"==typeof t)return t;if(Ds(t))return F;if(As(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=As(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(It,"");var n=Wt.test(t);return n||qt.test(t)?Le(t.slice(2),n?2:8):Vt.test(t)?F:+t}function Vs(t){return io(t,oc(t))}function Ws(t){return null==t?"":Ui(t)}var Xs=ao(function(t,e){if(Qo(e)||bs(e))io(e,ic(e),t);else for(var n in e)le.call(e,n)&&Cr(t,n,e[n])}),qs=ao(function(t,e){io(e,oc(e),t)}),Ys=ao(function(t,e,n,r){io(e,oc(e),t,r)}),Zs=ao(function(t,e,n,r){io(e,ic(e),t,r)}),Js=Po(Ir);var Ks=Ti(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Yo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=oc(a),c=-1,u=s.length;++c<u;){var l=s[c],h=t[l];(h===o||ds(h,se[l])&&!le.call(t,l))&&(t[l]=a[l])}return t}),Qs=Ti(function(t){return t.push(o,Ro),We(sc,o,t)});function $s(t,e,n){var r=null==t?o:Kr(t,e);return r===o?n:r}function tc(t,e){return null!=t&&Vo(t,e,ni)}var ec=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),t[e]=n},Ac(Lc)),nc=vo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=de.call(e)),le.call(t,e)?t[e].push(n):t[e]=[n]},Uo),rc=Ti(ii);function ic(t){return bs(t)?Tr(t):li(t)}function oc(t){return bs(t)?Tr(t,!0):hi(t)}var ac=ao(function(t,e,n){vi(t,e,n)}),sc=ao(function(t,e,n,r){vi(t,e,n,r)}),cc=Po(function(t,e){var n={};if(null==t)return n;var r=!1;e=$e(e,function(e){return e=qi(e,t),r||(r=e.length>1),e}),io(t,Oo(t),n),r&&(n=Fr(n,p|d|f,Co));for(var i=e.length;i--;)Bi(n,e[i]);return n});var uc=Po(function(t,e){return null==t?{}:function(t,e){return bi(t,e,function(e,n){return tc(t,n)})}(t,e)});function lc(t,e){if(null==t)return{};var n=$e(Oo(t),function(t){return[t]});return e=Uo(e),bi(t,n,function(t,n){return e(t,n[0])})}var hc=Mo(ic),pc=Mo(oc);function dc(t){return null==t?[]:yn(t,ic(t))}var fc=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?mc(e):e)});function mc(t){return Ec(Ws(t).toLowerCase())}function vc(t){return(t=Ws(t))&&t.replace(Zt,wn).replace(be,"")}var gc=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),yc=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bc=uo("toLowerCase");var _c=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var xc=lo(function(t,e,n){return t+(n?" ":"")+Ec(e)});var wc=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ec=uo("toUpperCase");function Tc(t,e,n){return t=Ws(t),(e=n?o:e)===o?function(t){return Ee.test(t)}(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.match(zt)||[]}(t):t.match(e)||[]}var Mc=Ti(function(t,e){try{return We(t,o,e)}catch(t){return Es(t)?t:new Qt(t)}}),Sc=Po(function(t,e){return qe(e,function(e){e=la(e),Or(t,e,ns(t[e],t))}),t});function Ac(t){return function(){return t}}var Rc=fo(),Cc=fo(!0);function Lc(t){return t}function Pc(t){return ui("function"==typeof t?t:Fr(t,p))}var Nc=Ti(function(t,e){return function(n){return ii(n,t,e)}}),Oc=Ti(function(t,e){return function(n){return ii(t,n,e)}});function Ic(t,e,n){var r=ic(e),i=Jr(e,r);null!=n||As(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Jr(e,ic(e)));var o=!(As(n)&&"chain"in n&&!n.chain),a=Ts(t);return qe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=ro(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function Dc(){}var Fc=yo($e),Uc=yo(Ze),Hc=yo(rn);function Bc(t){return Zo(t)?pn(la(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zc=_o(),kc=_o(!0);function Gc(){return[]}function jc(){return!1}var Vc=go(function(t,e){return t+e},0),Wc=Eo("ceil"),Xc=go(function(t,e){return t/e},1),qc=Eo("floor");var Yc,Zc=go(function(t,e){return t*e},1),Jc=Eo("round"),Kc=go(function(t,e){return t-e},0);return fr.after=function(t,e){if("function"!=typeof e)throw new ie(c);return t=ks(t),function(){if(--t<1)return e.apply(this,arguments)}},fr.ary=ts,fr.assign=Xs,fr.assignIn=qs,fr.assignInWith=Ys,fr.assignWith=Zs,fr.at=Js,fr.before=es,fr.bind=ns,fr.bindAll=Sc,fr.bindKey=rs,fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return gs(t)?t:[t]},fr.chain=Ba,fr.chunk=function(t,e,n){e=(n?Yo(t,e,n):e===o)?1:Xn(ks(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,c=r(Bn(i/e));a<i;)c[s++]=Pi(t,a,a+=e);return c},fr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return tn(gs(n)?ro(n):[n],Wr(e,1))},fr.cond=function(t){var e=null==t?0:t.length,n=Uo();return t=e?$e(t,function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]}):[],Ti(function(n){for(var r=-1;++r<e;){var i=t[r];if(We(i[0],this,n))return We(i[1],this,n)}})},fr.conforms=function(t){return function(t){var e=ic(t);return function(n){return Ur(n,t,e)}}(Fr(t,p))},fr.constant=Ac,fr.countBy=Ga,fr.create=function(t,e){var n=mr(t);return null==e?n:Nr(n,e)},fr.curry=function t(e,n,r){var i=So(e,_,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.curryRight=function t(e,n,r){var i=So(e,x,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},fr.debounce=is,fr.defaults=Ks,fr.defaultsDeep=Qs,fr.defer=os,fr.delay=as,fr.difference=da,fr.differenceBy=fa,fr.differenceWith=ma,fr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=n||e===o?1:ks(e))<0?0:e,r):[]},fr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,0,(e=r-(e=n||e===o?1:ks(e)))<0?0:e):[]},fr.dropRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0,!0):[]},fr.dropWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!0):[]},fr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Yo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ks(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ks(r))<0&&(r+=i),r=n>r?0:Gs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},fr.filter=function(t,e){return(gs(t)?Je:Vr)(t,Uo(e,3))},fr.flatMap=function(t,e){return Wr(Ja(t,e),1)},fr.flatMapDeep=function(t,e){return Wr(Ja(t,e),O)},fr.flatMapDepth=function(t,e,n){return n=n===o?1:ks(n),Wr(Ja(t,e),n)},fr.flatten=ya,fr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,O):[]},fr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===o?1:ks(e)):[]},fr.flip=function(t){return So(t,S)},fr.flow=Rc,fr.flowRight=Cc,fr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},fr.functions=function(t){return null==t?[]:Jr(t,ic(t))},fr.functionsIn=function(t){return null==t?[]:Jr(t,oc(t))},fr.groupBy=qa,fr.initial=function(t){return null!=t&&t.length?Pi(t,0,-1):[]},fr.intersection=_a,fr.intersectionBy=xa,fr.intersectionWith=wa,fr.invert=ec,fr.invertBy=nc,fr.invokeMap=Ya,fr.iteratee=Pc,fr.keyBy=Za,fr.keys=ic,fr.keysIn=oc,fr.map=Ja,fr.mapKeys=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,e(t,r,i),t)}),n},fr.mapValues=function(t,e){var n={};return e=Uo(e,3),Yr(t,function(t,r,i){Or(n,r,e(t,r,i))}),n},fr.matches=function(t){return fi(Fr(t,p))},fr.matchesProperty=function(t,e){return mi(t,Fr(e,p))},fr.memoize=ss,fr.merge=ac,fr.mergeWith=sc,fr.method=Nc,fr.methodOf=Oc,fr.mixin=Ic,fr.negate=cs,fr.nthArg=function(t){return t=ks(t),Ti(function(e){return gi(e,t)})},fr.omit=cc,fr.omitBy=function(t,e){return lc(t,cs(Uo(e)))},fr.once=function(t){return es(2,t)},fr.orderBy=function(t,e,n,r){return null==t?[]:(gs(e)||(e=null==e?[]:[e]),gs(n=r?o:n)||(n=null==n?[]:[n]),yi(t,e,n))},fr.over=Fc,fr.overArgs=us,fr.overEvery=Uc,fr.overSome=Hc,fr.partial=ls,fr.partialRight=hs,fr.partition=Ka,fr.pick=uc,fr.pickBy=lc,fr.property=Bc,fr.propertyOf=function(t){return function(e){return null==t?o:Kr(t,e)}},fr.pull=Ta,fr.pullAll=Ma,fr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,Uo(n,2)):t},fr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?_i(t,e,o,n):t},fr.pullAt=Sa,fr.range=zc,fr.rangeRight=kc,fr.rearg=ps,fr.reject=function(t,e){return(gs(t)?Je:Vr)(t,cs(Uo(e,3)))},fr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Uo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return xi(t,i),n},fr.rest=function(t,e){if("function"!=typeof t)throw new ie(c);return Ti(t,e=e===o?e:ks(e))},fr.reverse=Aa,fr.sampleSize=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),(gs(t)?Sr:Si)(t,e)},fr.set=function(t,e,n){return null==t?t:Ai(t,e,n)},fr.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Ai(t,e,n,r)},fr.shuffle=function(t){return(gs(t)?Ar:Li)(t)},fr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Yo(t,e,n)?(e=0,n=r):(e=null==e?0:ks(e),n=n===o?r:ks(n)),Pi(t,e,n)):[]},fr.sortBy=Qa,fr.sortedUniq=function(t){return t&&t.length?Di(t):[]},fr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,Uo(e,2)):[]},fr.split=function(t,e,n){return n&&"number"!=typeof n&&Yo(t,e,n)&&(e=n=o),(n=n===o?U:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ns(e))&&!(e=Ui(e))&&Mn(t)?Zi(On(t),0,n):t.split(e,n):[]},fr.spread=function(t,e){if("function"!=typeof t)throw new ie(c);return e=null==e?0:Xn(ks(e),0),Ti(function(n){var r=n[e],i=Zi(n,0,e);return r&&tn(i,r),We(t,this,i)})},fr.tail=function(t){var e=null==t?0:t.length;return e?Pi(t,1,e):[]},fr.take=function(t,e,n){return t&&t.length?Pi(t,0,(e=n||e===o?1:ks(e))<0?0:e):[]},fr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Pi(t,(e=r-(e=n||e===o?1:ks(e)))<0?0:e,r):[]},fr.takeRightWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3),!1,!0):[]},fr.takeWhile=function(t,e){return t&&t.length?ki(t,Uo(e,3)):[]},fr.tap=function(t,e){return e(t),t},fr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(c);return As(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},fr.thru=za,fr.toArray=Bs,fr.toPairs=hc,fr.toPairsIn=pc,fr.toPath=function(t){return gs(t)?$e(t,la):Ds(t)?[t]:ro(ua(Ws(t)))},fr.toPlainObject=Vs,fr.transform=function(t,e,n){var r=gs(t),i=r||xs(t)||Fs(t);if(e=Uo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:As(t)&&Ts(o)?mr(Pe(t)):{}}return(i?qe:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},fr.unary=function(t){return ts(t,1)},fr.union=Ra,fr.unionBy=Ca,fr.unionWith=La,fr.uniq=function(t){return t&&t.length?Hi(t):[]},fr.uniqBy=function(t,e){return t&&t.length?Hi(t,Uo(e,2)):[]},fr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Hi(t,o,e):[]},fr.unset=function(t,e){return null==t||Bi(t,e)},fr.unzip=Pa,fr.unzipWith=Na,fr.update=function(t,e,n){return null==t?t:zi(t,e,Xi(n))},fr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:zi(t,e,Xi(n),r)},fr.values=dc,fr.valuesIn=function(t){return null==t?[]:yn(t,oc(t))},fr.without=Oa,fr.words=Tc,fr.wrap=function(t,e){return ls(Xi(e),t)},fr.xor=Ia,fr.xorBy=Da,fr.xorWith=Fa,fr.zip=Ua,fr.zipObject=function(t,e){return Vi(t||[],e||[],Cr)},fr.zipObjectDeep=function(t,e){return Vi(t||[],e||[],Ai)},fr.zipWith=Ha,fr.entries=hc,fr.entriesIn=pc,fr.extend=qs,fr.extendWith=Ys,Ic(fr,fr),fr.add=Vc,fr.attempt=Mc,fr.camelCase=fc,fr.capitalize=mc,fr.ceil=Wc,fr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=js(n))==n?n:0),e!==o&&(e=(e=js(e))==e?e:0),Dr(js(t),e,n)},fr.clone=function(t){return Fr(t,f)},fr.cloneDeep=function(t){return Fr(t,p|f)},fr.cloneDeepWith=function(t,e){return Fr(t,p|f,e="function"==typeof e?e:o)},fr.cloneWith=function(t,e){return Fr(t,f,e="function"==typeof e?e:o)},fr.conformsTo=function(t,e){return null==e||Ur(t,e,ic(e))},fr.deburr=vc,fr.defaultTo=function(t,e){return null==t||t!=t?e:t},fr.divide=Xc,fr.endsWith=function(t,e,n){t=Ws(t),e=Ui(e);var r=t.length,i=n=n===o?r:Dr(ks(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},fr.eq=ds,fr.escape=function(t){return(t=Ws(t))&&Mt.test(t)?t.replace(Et,En):t},fr.escapeRegExp=function(t){return(t=Ws(t))&&Ot.test(t)?t.replace(Nt,"\\\\$&"):t},fr.every=function(t,e,n){var r=gs(t)?Ze:Gr;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.find=ja,fr.findIndex=va,fr.findKey=function(t,e){return an(t,Uo(e,3),Yr)},fr.findLast=Va,fr.findLastIndex=ga,fr.findLastKey=function(t,e){return an(t,Uo(e,3),Zr)},fr.floor=qc,fr.forEach=Wa,fr.forEachRight=Xa,fr.forIn=function(t,e){return null==t?t:Xr(t,Uo(e,3),oc)},fr.forInRight=function(t,e){return null==t?t:qr(t,Uo(e,3),oc)},fr.forOwn=function(t,e){return t&&Yr(t,Uo(e,3))},fr.forOwnRight=function(t,e){return t&&Zr(t,Uo(e,3))},fr.get=$s,fr.gt=fs,fr.gte=ms,fr.has=function(t,e){return null!=t&&Vo(t,e,ei)},fr.hasIn=tc,fr.head=ba,fr.identity=Lc,fr.includes=function(t,e,n,r){t=bs(t)?t:dc(t),n=n&&!r?ks(n):0;var i=t.length;return n<0&&(n=Xn(i+n,0)),Is(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},fr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ks(n);return i<0&&(i=Xn(r+i,0)),cn(t,e,i)},fr.inRange=function(t,e,n){return e=zs(e),n===o?(n=e,e=0):n=zs(n),function(t,e,n){return t>=qn(e,n)&&t<Xn(e,n)}(t=js(t),e,n)},fr.invoke=rc,fr.isArguments=vs,fr.isArray=gs,fr.isArrayBuffer=ys,fr.isArrayLike=bs,fr.isArrayLikeObject=_s,fr.isBoolean=function(t){return!0===t||!1===t||Rs(t)&&$r(t)==V},fr.isBuffer=xs,fr.isDate=ws,fr.isElement=function(t){return Rs(t)&&1===t.nodeType&&!Ps(t)},fr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(gs(t)||"string"==typeof t||"function"==typeof t.splice||xs(t)||Fs(t)||vs(t)))return!t.length;var e=jo(t);if(e==J||e==nt)return!t.size;if(Qo(t))return!li(t).length;for(var n in t)if(le.call(t,n))return!1;return!0},fr.isEqual=function(t,e){return ai(t,e)},fr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?ai(t,e,o,n):!!r},fr.isError=Es,fr.isFinite=function(t){return"number"==typeof t&&jn(t)},fr.isFunction=Ts,fr.isInteger=Ms,fr.isLength=Ss,fr.isMap=Cs,fr.isMatch=function(t,e){return t===e||si(t,e,Bo(e))},fr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,si(t,e,Bo(e),n)},fr.isNaN=function(t){return Ls(t)&&t!=+t},fr.isNative=function(t){if(Ko(t))throw new Qt(s);return ci(t)},fr.isNil=function(t){return null==t},fr.isNull=function(t){return null===t},fr.isNumber=Ls,fr.isObject=As,fr.isObjectLike=Rs,fr.isPlainObject=Ps,fr.isRegExp=Ns,fr.isSafeInteger=function(t){return Ms(t)&&t>=-I&&t<=I},fr.isSet=Os,fr.isString=Is,fr.isSymbol=Ds,fr.isTypedArray=Fs,fr.isUndefined=function(t){return t===o},fr.isWeakMap=function(t){return Rs(t)&&jo(t)==at},fr.isWeakSet=function(t){return Rs(t)&&$r(t)==st},fr.join=function(t,e){return null==t?"":Vn.call(t,e)},fr.kebabCase=gc,fr.last=Ea,fr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ks(n))<0?Xn(r+i,0):qn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):sn(t,ln,i,!0)},fr.lowerCase=yc,fr.lowerFirst=bc,fr.lt=Us,fr.lte=Hs,fr.max=function(t){return t&&t.length?jr(t,Lc,ti):o},fr.maxBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),ti):o},fr.mean=function(t){return hn(t,Lc)},fr.meanBy=function(t,e){return hn(t,Uo(e,2))},fr.min=function(t){return t&&t.length?jr(t,Lc,pi):o},fr.minBy=function(t,e){return t&&t.length?jr(t,Uo(e,2),pi):o},fr.stubArray=Gc,fr.stubFalse=jc,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Zc,fr.nth=function(t,e){return t&&t.length?gi(t,ks(e)):o},fr.noConflict=function(){return Oe._===this&&(Oe._=me),this},fr.noop=Dc,fr.now=$a,fr.pad=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return bo(zn(i),n)+t+bo(Bn(i),n)},fr.padEnd=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?t+bo(e-r,n):t},fr.padStart=function(t,e,n){t=Ws(t);var r=(e=ks(e))?Nn(t):0;return e&&r<e?bo(e-r,n)+t:t},fr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Zn(Ws(t).replace(Dt,""),e||0)},fr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Yo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=zs(t),e===o?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Jn();return qn(t+i*(e-t+Ce("1e-"+((i+"").length-1))),e)}return wi(t,e)},fr.reduce=function(t,e,n){var r=gs(t)?en:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,zr)},fr.reduceRight=function(t,e,n){var r=gs(t)?nn:fn,i=arguments.length<3;return r(t,Uo(e,4),n,i,kr)},fr.repeat=function(t,e,n){return e=(n?Yo(t,e,n):e===o)?1:ks(e),Ei(Ws(t),e)},fr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},fr.result=function(t,e,n){var r=-1,i=(e=qi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[la(e[r])];a===o&&(r=i,a=n),t=Ts(a)?a.call(t):a}return t},fr.round=Jc,fr.runInContext=t,fr.sample=function(t){return(gs(t)?Mr:Mi)(t)},fr.size=function(t){if(null==t)return 0;if(bs(t))return Is(t)?Nn(t):t.length;var e=jo(t);return e==J||e==nt?t.size:li(t).length},fr.snakeCase=_c,fr.some=function(t,e,n){var r=gs(t)?rn:Ni;return n&&Yo(t,e,n)&&(e=o),r(t,Uo(e,3))},fr.sortedIndex=function(t,e){return Oi(t,e)},fr.sortedIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2))},fr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Oi(t,e);if(r<n&&ds(t[r],e))return r}return-1},fr.sortedLastIndex=function(t,e){return Oi(t,e,!0)},fr.sortedLastIndexBy=function(t,e,n){return Ii(t,e,Uo(n,2),!0)},fr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Oi(t,e,!0)-1;if(ds(t[n],e))return n}return-1},fr.startCase=xc,fr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(ks(n),0,t.length),e=Ui(e),t.slice(n,n+e.length)==e},fr.subtract=Kc,fr.sum=function(t){return t&&t.length?mn(t,Lc):0},fr.sumBy=function(t,e){return t&&t.length?mn(t,Uo(e,2)):0},fr.template=function(t,e,n){var r=fr.templateSettings;n&&Yo(t,e,n)&&(e=o),t=Ws(t),e=Ys({},e,r,Ao);var i,a,s=Ys({},e.imports,r.imports,Ao),c=ic(s),u=yn(s,c),l=0,h=e.interpolate||Jt,p="__p += \'",d=ne((e.escape||Jt).source+"|"+h.source+"|"+(h===Rt?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),f="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Me+"]")+"\\n";t.replace(d,function(e,n,r,o,s,c){return r||(r=o),p+=t.slice(l,c).replace(Kt,Tn),n&&(i=!0,p+="\' +\\n__e("+n+") +\\n\'"),s&&(a=!0,p+="\';\\n"+s+";\\n__p += \'"),r&&(p+="\' +\\n((__t = ("+r+")) == null ? \'\' : __t) +\\n\'"),l=c+e.length,e}),p+="\';\\n";var m=e.variable;m||(p="with (obj) {\\n"+p+"\\n}\\n"),p=(a?p.replace(bt,""):p).replace(_t,"$1").replace(xt,"$1;"),p="function("+(m||"obj")+") {\\n"+(m?"":"obj || (obj = {});\\n")+"var __t, __p = \'\'"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, \'\') }\\n":";\\n")+p+"return __p\\n}";var v=Mc(function(){return $t(c,f+"return "+p).apply(o,u)});if(v.source=p,Es(v))throw v;return v},fr.times=function(t,e){if((t=ks(t))<1||t>I)return[];var n=U,r=qn(t,U);e=Uo(e),t-=U;for(var i=vn(r,e);++n<t;)e(n);return i},fr.toFinite=zs,fr.toInteger=ks,fr.toLength=Gs,fr.toLower=function(t){return Ws(t).toLowerCase()},fr.toNumber=js,fr.toSafeInteger=function(t){return t?Dr(ks(t),-I,I):0===t?t:0},fr.toString=Ws,fr.toUpper=function(t){return Ws(t).toUpperCase()},fr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(It,"");if(!t||!(e=Ui(e)))return t;var r=On(t),i=On(e);return Zi(r,_n(r,i),xn(r,i)+1).join("")},fr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Ft,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,0,xn(r,On(e))+1).join("")},fr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===o))return t.replace(Dt,"");if(!t||!(e=Ui(e)))return t;var r=On(t);return Zi(r,_n(r,On(e))).join("")},fr.truncate=function(t,e){var n=A,r=R;if(As(e)){var i="separator"in e?e.separator:i;n="length"in e?ks(e.length):n,r="omission"in e?Ui(e.omission):r}var a=(t=Ws(t)).length;if(Mn(t)){var s=On(t);a=s.length}if(n>=a)return t;var c=n-Nn(r);if(c<1)return r;var u=s?Zi(s,0,c).join(""):t.slice(0,c);if(i===o)return u+r;if(s&&(c+=u.length-c),Ns(i)){if(t.slice(c).search(i)){var l,h=u;for(i.global||(i=ne(i.source,Ws(jt.exec(i))+"g")),i.lastIndex=0;l=i.exec(h);)var p=l.index;u=u.slice(0,p===o?c:p)}}else if(t.indexOf(Ui(i),c)!=c){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},fr.unescape=function(t){return(t=Ws(t))&&Tt.test(t)?t.replace(wt,In):t},fr.uniqueId=function(t){var e=++he;return Ws(t)+e},fr.upperCase=wc,fr.upperFirst=Ec,fr.each=Wa,fr.eachRight=Xa,fr.first=ba,Ic(fr,(Yc={},Yr(fr,function(t,e){le.call(fr.prototype,e)||(Yc[e]=t)}),Yc),{chain:!1}),fr.VERSION="4.17.10",qe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){fr[t].placeholder=fr}),qe(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===o?1:Xn(ks(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=qn(n,r.__takeCount__):r.__views__.push({size:qn(n,U),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),qe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==P||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Uo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),qe(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),qe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Lc)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=Ti(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Uo(t)))},yr.prototype.slice=function(t,e){t=ks(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=ks(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(U)},Yr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=fr[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(fr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,c=e instanceof yr,u=s[0],l=c||gs(e),h=function(t){var e=i.apply(fr,tn([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof u&&1!=u.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&l){e=m?e:new yr(this);var v=t.apply(e,s);return v.__actions__.push({func:za,args:[h],thisArg:o}),new gr(v,p)}return f&&m?t.apply(this,s):(v=this.thru(h),f?r?v.value()[0]:v.value():v)})}),qe(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);fr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(gs(i)?i:[],t)}return this[n](function(n){return e.apply(gs(n)?n:[],t)})}}),Yr(yr.prototype,function(t,e){var n=fr[e];if(n){var r=n.name+"";(or[r]||(or[r]=[])).push({name:e,func:n})}}),or[mo(o,y).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ro(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ro(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ro(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=gs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=qn(e,t+a);break;case"takeRight":t=Xn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,h=l.length,p=0,d=qn(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Gi(t,this.__actions__);var f=[];t:for(;c--&&p<d;){for(var m=-1,v=t[u+=e];++m<h;){var g=l[m],y=g.iteratee,b=g.type,_=y(v);if(b==N)v=_;else if(!_){if(b==P)continue t;break t}}f[p++]=v}return f},fr.prototype.at=ka,fr.prototype.chain=function(){return Ba(this)},fr.prototype.commit=function(){return new gr(this.value(),this.__chain__)},fr.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},fr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var r=pa(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:za,args:[Aa],thisArg:o}),new gr(e,this.__chain__)}return this.thru(Aa)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,He&&(fr.prototype[He]=function(){return this}),fr}();Oe._=Dn,(i=function(){return Dn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(0),n(13)(t))},function(t,e,n){const r=n(14),i=n(12),o=n(1),a=o("R-Type:debug"),s=o("R-Type:error"),c=n(4),u=c.isPositiveNumber,l=c.isObject3DShorthand,h=c.isLightShorthand,p=i.Math.degToRad,d=["click","dblclick"];class f extends HTMLElement{constructor(){super(),this.style.display="block",this.style.width="400px",this.style.height="300px",this.init(),this.resize=r.debounce(this.resize,100)}static get observedAttributes(){return["width","height","position","scale","rotation","controls","autoplay","light","src","show","hide","mtl"]}attributeChangedCallback(t,e,n){a("attributeChangedCallback");const r=this.data;if(r.enabled=this.hasAttribute("controls"),r.autoplay=this.hasAttribute("autoplay"),e!==n){switch(t){case"width":u(n)&&(r.width=parseInt(n));break;case"height":u(n)&&(r.height=n);break;case"position":if(l(n)){const t=n.split(" ");r.positionX=parseFloat(t[0]),r.positionY=parseFloat(t[1]),r.positionZ=parseFloat(t[2])}break;case"scale":if(l(n)){const t=n.split(" "),e=parseFloat(t[0]),i=parseFloat(t[1]),o=parseFloat(t[2]);r.scaleX=e>0?e:1e-4,r.scaleY=i>0?i:1e-4,r.scaleZ=o>0?o:1e-4}break;case"rotation":if(l(n)){const t=n.split(" ");r.rotationX=parseFloat(t[0]),r.rotationY=parseFloat(t[1]),r.rotationZ=parseFloat(t[2])}break;case"light":if(h(n)){const t=n.split(" ");r.color=t[0],r.groundColor=t[1],r.intensity=parseFloat(t[2])}break;case"mtl":case"src":this.hasLoaded&&(this.stop(),this.scene.remove(this.object3D),this.hasLoaded=!1,this.mixer=null,this.actions=[]),this.play();break;case"show":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="block"}):this.canvas.style.display="block";break;case"hide":-1!==d.indexOf(n)?this.addEventListener(n,function(){this.canvas.style.display="none"}):this.canvas.style.display="none"}this.resize()}}connectedCallback(){a("connectedCallback")}initData(){return{height:300,width:400,far:2e3,fov:50,near:.1,zoom:1,color:"0xffffff",groundColor:"0xffffff",intensity:1,positionX:0,positionY:0,positionZ:0,scaleX:1,scaleY:1,scaleZ:1,rotationX:0,rotationY:0,rotationZ:0,enabled:!1,autoplay:!1}}init(){a("init"),this.data=this.initData(),this.hasLoaded=!1,this.animator=null,this.renderStarted=!1,this.mixer=null,this.actions=[],this.object3D=null,this.scene=new i.Scene,this.gltfLoader=new i.GLTFLoader,this.fbxLoader=new i.FBXLoader,this.mtlLoader=new i.MTLLoader,this.objLoader=new i.OBJLoader,this.setupCanvas(),this.setupCamera(),this.setupLight(),this.setupRenderer(),this.setupControls()}setupCanvas(){let t;a("setupCanvas"),t=document.createElement("canvas"),this.appendChild(t),this.canvas=t}setupCamera(){let t;a("setupCamera"),(t=this.camera=new i.PerspectiveCamera).position.y=100,t.position.z=300}setupLight(){let t;a("setupLight"),t=this.light=new i.HemisphereLight,this.scene.add(t)}setupRenderer(){let t;a("setupRenderer"),(t=this.renderer=new i.WebGLRenderer({canvas:this.canvas,alpha:!0})).setPixelRatio(window.devicePixelRatio),t.setSize(this.canvas.offsetWidth,this.canvas.offsetHeight)}setupControls(){let t;a("setupControls"),(t=this.controls=new i.OrbitControls(this.camera,this)).enabled=!1}load(){a("load");const t=this;if(this.hasLoaded)return;const e=this.getAttribute("src");if(!e)return void s(\'There is no 3D model source. Please set the 3D object file to the "src" attribute on the element.\');const n=e.split(".").pop();if("fbx"===n)this.fbxLoader.load(e,function(e){t.animations=e.animations,t.mixer=new i.AnimationMixer(e);for(const e of t.animations){const n=t.mixer.clipAction(e);t.actions.push(n)}t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")});else if("obj"===n){const n=this.objLoader,r=this.mtlLoader,i=function(e){t.hasLoaded=!0,t.object3D=e,t.scene.add(e),t.emit("loaded")},o=this.getAttribute("mtl");if(o)return r.setTexturePath(o.substr(0,o.lastIndexOf("/")+1)),void r.load(o,function(t){t.preload(),n.setMaterials(t),n.load(e,i)});n.load(e,i)}else"gltf"===n&&this.gltfLoader.load(e,function(e){t.object3D=e.scene||e.scenes[0],t.animations=e.animations,t.mixer=new i.AnimationMixer(t.object3D);for(const n of e.animations){const e=t.mixer.clipAction(n);t.actions.push(e)}t.scene.add(t.object3D),t.emit("loaded")},void 0,function(t){t(t&&t.message?t.message:"Failed to load glTF model")})}play(){a("play");const t=this;this.addEventListener("loaded",function(){t.renderStarted||(t.resize(),t.renderer&&(a("render started"),t.clock=new i.Clock,t.render(),t.renderStarted=!0))}),this.load()}stop(){a("stop"),this.renderStarted&&(cancelAnimationFrame(this.animator),this.renderStarted=!1,this.clock=null,this.renderer.clear())}render(){const t=this;this.animator=requestAnimationFrame(()=>{t.render()});const e=this.mixer;e&&e.update(this.clock.getDelta()),this.renderer.render(this.scene,this.camera)}getCanvasSize(t){return{height:t.parentElement.offsetHeight,width:t.parentElement.offsetWidth}}update(){a("update");const t=this.data,e=this.camera,n=this.light,r=this.object3D,i=this.controls,o=this.actions,s=this.mixer;if(this.style.height=t.height+"px",this.style.width=t.width+"px",e.far=t.far,e.fov=t.fov,e.near=t.near,e.zoom=t.zoom,n.color.setHex(t.color),n.groundColor.setHex(t.groundColor),n.intensity=t.intensity,i.enabled=t.enabled,o)if(t.autoplay)for(const t of o)t.play();else s&&s.stopAllAction();r&&(r.position.set(t.positionX,t.positionY,t.positionZ),r.scale.set(t.scaleX,t.scaleY,t.scaleZ),r.rotation.set(p(t.rotationX),p(t.rotationY),p(t.rotationZ)))}resize(){a("resize");const t=this.camera,e=this.canvas,n=this.renderer;let r;t&&e&&n&&(this.update(),r=this.getCanvasSize(e),e.style.width=r.width,e.style.height=r.height,t.aspect=r.width/r.height,t.updateProjectionMatrix(),n.setSize(r.width,r.height))}emit(t,e,n,r){a("emit");var i={};void 0===n&&(n=!0),i.bubbles=!!n,i.detail=e,r&&(i=Object.assign({},r,i)),this.dispatchEvent(new CustomEvent(t,i))}}customElements.define("r-type",f),t.exports=f},function(t,e){var n=1e3,r=60*n,i=60*r,o=24*i,a=365.25*o;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,o,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var o=a[c];n=i.call(t,o),a.splice(c,1),c--}return n}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var o=e.instances[n];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(16),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}(e=t.exports=n(17)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(o=++i)}),t.splice(o,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(this,n(2))},function(t,e,n){(function(e,r){(function(){"use strict";var i="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this;!function(){function o(){var t=this;this.s={},this.g=document.documentElement;var e=new p;e.rules=[],this.h=l.set(this.g,new l(e)),this.i=!1,this.b=this.a=null,Ht(function(){t.c()})}function a(){this.customStyles=[],this.enqueued=!1}function s(){}function c(t){this.cache={},this.c=void 0===t?100:t}function u(){}function l(t,e,n,r,i){this.H=t||null,this.b=e||null,this.Ba=n||[],this.R=null,this.$=i||"",this.a=this.F=this.J=null}function h(){}function p(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function d(t,e,n){e.prepend=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.Sa.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},e.append=function(e){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),n.append.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)}}function f(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.i=new v(t,document)}function m(){var t=this;this.b=this.a=void 0,this.c=new Promise(function(e){t.b=e,t.a&&e(t.a)})}function v(t,e){this.b=t,this.a=e,this.M=void 0,this.b.c(this.a),"loading"===this.a.readyState&&(this.M=new MutationObserver(this.f.bind(this)),this.M.observe(this.a,{childList:!0,subtree:!0}))}function g(){this.s=new Map,this.o=new Map,this.i=[],this.h=!1}function y(t,e){if(t!==Ne)throw new TypeError("Illegal constructor");return(t=document.createDocumentFragment()).__proto__=y.prototype,t.i(e),t}function b(t){this.root=t,this.fa="slot"}function _(t){if(!t.__shady||void 0===t.__shady.firstChild){t.__shady=t.__shady||{},t.__shady.firstChild=O(t),t.__shady.lastChild=I(t),we(t);for(var e,n=t.__shady.childNodes=U(t),r=0;r<n.length&&(e=n[r]);r++)e.__shady=e.__shady||{},e.__shady.parentNode=t,e.__shady.nextSibling=n[r+1]||null,e.__shady.previousSibling=n[r-1]||null,xe(e)}}function x(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ea=new Set}function w(t){return"ShadyRoot"===t.eb}function E(t){if(w(t=t.getRootNode()))return t}function T(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(e,n);o&&Object.defineProperty(t,n,o)}}function M(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)T(t,n[r]);return t}function S(t){Wt.push(t),jt.textContent=Vt++}function A(t){Xt||(Xt=!0,S(R)),qt.push(t)}function R(){Xt=!1;for(var t=!!qt.length;qt.length;)qt.shift()();return t}function C(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case\'"\':return"&quot;";case"\xa0":return"&nbsp;"}}function L(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}function P(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,a=i.length;o<a&&(n=i[o]);o++){var s;t:{var c;c=t;var u=e;switch((s=n).nodeType){case Node.ELEMENT_NODE:for(var l=s.localName,h="<"+l,p=s.attributes,d=0;c=p[d];d++)h+=" "+c.name+\'="\'+c.value.replace(se,C)+\'"\';h+=">",s=ue[l]?h:h+P(s,u)+"</"+l+">";break t;case Node.TEXT_NODE:s=s.data,s=c&&le[c.localName]?s:s.replace(ce,C);break t;case Node.COMMENT_NODE:s="\\x3c!--"+s.data+"--\\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}function N(t){return he.currentNode=t,he.parentNode()}function O(t){return he.currentNode=t,he.firstChild()}function I(t){return he.currentNode=t,he.lastChild()}function D(t){return he.currentNode=t,he.previousSibling()}function F(t){return he.currentNode=t,he.nextSibling()}function U(t){var e=[];for(he.currentNode=t,t=he.firstChild();t;)e.push(t),t=he.nextSibling();return e}function H(t){return pe.currentNode=t,pe.parentNode()}function B(t){return pe.currentNode=t,pe.firstChild()}function z(t){return pe.currentNode=t,pe.lastChild()}function k(t){return pe.currentNode=t,pe.previousSibling()}function G(t){return pe.currentNode=t,pe.nextSibling()}function j(t){var e=[];for(pe.currentNode=t,t=pe.firstChild();t;)e.push(t),t=pe.nextSibling();return e}function V(t){return P(t,function(t){return U(t)})}function W(t){if(t.nodeType!==Node.ELEMENT_NODE)return t.nodeValue;t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n}function X(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function q(t){X(t,ge),X(t,ye),X(t,_e)}function Y(t,e,n){xe(t),n=n||null,t.__shady=t.__shady||{},e.__shady=e.__shady||{},n&&(n.__shady=n.__shady||{}),t.__shady.previousSibling=n?n.__shady.previousSibling:e.lastChild;var r=t.__shady.previousSibling;r&&r.__shady&&(r.__shady.nextSibling=t),(r=t.__shady.nextSibling=n)&&r.__shady&&(r.__shady.previousSibling=t),t.__shady.parentNode=e,n?n===e.__shady.firstChild&&(e.__shady.firstChild=t):(e.__shady.lastChild=t,e.__shady.firstChild||(e.__shady.firstChild=t)),e.__shady.childNodes=null}function Z(t){var e,n=t.__shady&&t.__shady.parentNode,r=E(t);if(n||r){if(e=tt(t),n){t.__shady=t.__shady||{},n.__shady=n.__shady||{},t===n.__shady.firstChild&&(n.__shady.firstChild=t.__shady.nextSibling),t===n.__shady.lastChild&&(n.__shady.lastChild=t.__shady.previousSibling);var i=t.__shady.previousSibling,o=t.__shady.nextSibling;i&&(i.__shady=i.__shady||{},i.__shady.nextSibling=o),o&&(o.__shady=o.__shady||{},o.__shady.previousSibling=i),t.__shady.parentNode=t.__shady.previousSibling=t.__shady.nextSibling=void 0,void 0!==n.__shady.childNodes&&(n.__shady.childNodes=null)}if(i=r){var a;for(i=r.ta(),o=0;o<i.length;o++){var s,c=i[o];t:{for(s=c;s;){if(s==t){s=!0;break t}s=s.parentNode}s=void 0}if(s)for(c=c.assignedNodes({flatten:!0}),s=0;s<c.length;s++){a=!0;var u=c[s],l=N(u);l&&Jt.call(l,u)}}i=a}n=n&&r&&n.localName===r.C.fa,(i||n)&&(r.ca=!1,et(r))}return $(t),e}function J(t,e,n){(t=t.__shady&&t.__shady.Y)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),t.Bb())}function K(t){if(t&&t.nodeType){t.__shady=t.__shady||{};var e=t.__shady.Ca;return void 0===e&&(e=w(t)?t:(e=t.parentNode)?K(e):t,document.documentElement.contains(t)&&(t.__shady.Ca=e)),e}}function Q(t){return(t=t&&t.__shady&&t.__shady.root)&&t.za()}function $(t){if(t.__shady&&void 0!==t.__shady.Ca)for(var e,n=t.childNodes,r=0,i=n.length;r<i&&(e=n[r]);r++)$(e);t.__shady=t.__shady||{},t.__shady.Ca=void 0}function tt(t){if(Q(t=t.parentNode))return et(t.__shady.root),!0}function et(t){t.sa=!0,t.update()}function nt(t,e){"slot"===e?tt(t):"slot"===t.localName&&"name"===e&&(t=E(t))&&t.update()}function rt(t,e,n){var r=[];return function t(e,n,r,i){for(var o,a=0,s=e.length;a<s&&(o=e[a]);a++){var c;if(c=o.nodeType===Node.ELEMENT_NODE){var u=n,l=r,h=i,p=u(c=o);p&&h.push(c),l&&l(p)?c=p:(t(c.childNodes,u,l,h),c=void 0)}if(c)break}}(t.childNodes,e,n,r),r}function it(t){w(t=t.getRootNode())&&t.Ta()}function ot(t,e,n){if(n&&(void 0!==(i=n.__shady&&n.__shady.parentNode)&&i!==t||void 0===i&&N(n)!==t))throw Error("Failed to execute \'insertBefore\' on \'Node\': The node before which the new node is to be inserted is not a child of this node.");if(n===e)return e;e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&((i=e.__shady&&e.__shady.parentNode)?(J(i,null,e),Z(e)):(e.parentNode&&Jt.call(e.parentNode,e),$(e)));var r,i=n,o=E(t);if(o&&(e.__noInsertionPoint&&!o.sa&&(o.ca=!0),r=function t(e,n,r){var i,o=r.C.fa;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noInsertionPoint)e.localName===o&&(_(n),_(e),i=!0);else{o=e.querySelectorAll(o);for(var a,s,c=0;c<o.length&&(a=o[c]);c++)(s=a.parentNode)===e&&(s=n),s=t(a,s,r),i=i||s}return i}(e,t,o))&&(o.ca=!1),t.__shady&&void 0!==t.__shady.firstChild)if(we(t),t.__shady=t.__shady||{},void 0!==t.__shady.firstChild&&(t.__shady.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var a=e.childNodes,s=0;s<a.length;s++)Y(a[s],t,i);e.__shady=e.__shady||{},a=void 0!==e.__shady.firstChild?null:void 0,e.__shady.firstChild=e.__shady.lastChild=a,e.__shady.childNodes=a}else Y(e,t,i);a=r,s=o&&o.C.fa||"";var c=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noInsertionPoint&&s&&e.querySelector(s);if(r=c&&c.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((c=c||e.localName===s)||t.localName===s||a)&&o&&et(o),(o=Q(t))&&et(t.__shady&&t.__shady.root),!(o||c&&!r||t.__shady.root||i&&w(i.parentNode)&&i.parentNode.N)){if(n&&(i=E(n))){var u;if(n.localName===i.C.fa)t:{for(i=n.assignedNodes({flatten:!0}),o=K(n),r=0,a=i.length;r<a&&(u=i[r]);r++)if(o.ga(n,u))break t;u=void 0}else u=n;n=u}u=w(t)?t.host:t,n?Zt.call(u,e,n):Yt.call(u,e)}return J(t,e),e}function at(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function st(t,e){if(!w)return t;t=at(t,!0);for(var n,r,i,o,a=0;a<e.length;a++)if((i=(n=e[a])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!w(i)||-1<o)return n}function ct(t){function e(e,n){return(e=new t(e,n)).oa=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}function ut(t,e,n){if(n=e.B&&e.B[t.type]&&e.B[t.type][n])for(var r,i=0;(r=n[i])&&t.target!==t.relatedTarget&&(r.call(e,t),!t.bb);i++);}function lt(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return e},configurable:!0});for(var r=n.length-1;0<=r;r--)if(ut(t,e=n[r],"capture"),t.pa)return;Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}});var i;for(r=0;r<n.length&&(e=n[r],r&&(!e.shadowRoot||e.shadowRoot!==i)||(ut(t,e,"bubble"),e!==window&&(i=e.getRootNode()),!t.pa));r++);}function ht(t,e,n,r,i,o){for(var a=0;a<t.length;a++){var s=t[a],c=s.type,u=s.capture,l=s.once,h=s.passive;if(e===s.node&&n===c&&r===u&&i===l&&o===h)return a}return-1}function pt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a=n&&n.qa||this,s=e.aa;if(s){if(-1<ht(s,a,t,r,i,o))return}else e.aa=[];s=function(r){var o;if(i&&this.removeEventListener(t,e,n),r.__target||ft(r),a!==this&&(o=Object.getOwnPropertyDescriptor(r,"currentTarget"),Object.defineProperty(r,"currentTarget",{get:function(){return a},configurable:!0})),r.composed||-1<r.composedPath().indexOf(a))if(r.target===r.relatedTarget)r.eventPhase===Event.BUBBLING_PHASE&&r.stopImmediatePropagation();else if(r.eventPhase===Event.CAPTURING_PHASE||r.bubbles||r.target===a){var s="object"==typeof e&&e.handleEvent?e.handleEvent(r):e.call(a,r);return a!==this&&(o?(Object.defineProperty(r,"currentTarget",o),o=null):delete r.currentTarget),s}},e.aa.push({node:this,type:t,capture:r,once:i,passive:o,Eb:s}),Se[t]?(this.B=this.B||{},this.B[t]=this.B[t]||{capture:[],bubble:[]},this.B[t][r?"capture":"bubble"].push(s)):(this instanceof Window?re:ee).call(this,t,s,n)}}function dt(t,e,n){if(e){var r,i,o;"object"==typeof n?(r=!!n.capture,i=!!n.once,o=!!n.passive):(r=!!n,o=i=!1);var a,s=n&&n.qa||this,c=void 0;a=null;try{a=e.aa}catch(t){}a&&(-1<(i=ht(a,s,t,r,i,o))&&(c=a.splice(i,1)[0].Eb,a.length||(e.aa=void 0))),(this instanceof Window?ie:ne).call(this,t,c||e,n),c&&Se[t]&&this.B&&this.B[t]&&(-1<(c=(t=this.B[t][r?"capture":"bubble"]).indexOf(c))&&t.splice(c,1))}}function ft(t){if(t.__target=t.target,t.Ia=t.relatedTarget,Bt.X){var e=Me,n=Object.getPrototypeOf(t);if(!n.hasOwnProperty("__patchProto")){var r=Object.create(n);r.Gb=n,T(r,e),n.__patchProto=r}t.__proto__=n.__patchProto}else T(t,Me)}function mt(t,e){return{index:t,Z:[],da:e}}function vt(t,e){return t===e}function gt(t){return it(t),t.__shady&&t.__shady.assignedSlot||null}function yt(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}function bt(t){var e=Ge.has(t);return t=/^[a-z][.0-9_a-z]*-[\\-.0-9_a-z]*$/.test(t),!e&&t}function _t(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function xt(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function wt(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)wt(r,e,n);r=xt(t,i);continue}if("template"===o){r=xt(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)wt(i,e,n)}r=r.firstChild?r.firstChild:xt(t,r)}}function Et(t,e,n){t[e]=n}function Tt(t){var e=Mt,n=t=t.replace(Mn.rb,"").replace(Mn.port,""),r=new p;r.start=0,r.end=n.length;for(var i=r,o=0,a=n.length;o<a;o++)if("{"===n[o]){i.rules||(i.rules=[]);var s=i,c=s.rules[s.rules.length-1]||null;(i=new p).start=o+1,i.parent=s,i.previous=c,s.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function Mt(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\\\([0-9a-f]{1,6})\\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\\\"+t})}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(Mn.Ra," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=!n.indexOf("@"),t.atRule?n.indexOf("@media")?n.match(Mn.xb)&&(t.type=Tn.na,t.keyframesName=t.selector.split(Mn.Ra).pop()):t.type=Tn.MEDIA_RULE:t.type=n.indexOf("--")?Tn.STYLE_RULE:Tn.Ea),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)Mt(r,e);return t}function St(t){En=(!t||!t.shimcssproperties)&&(Sn||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function At(t,e){return t?("string"==typeof t&&(t=Tt(t)),e&&Lt(t,e),function t(e,n,r){r=void 0===r?"":r;var i="";if(e.cssText||e.rules){var o,a=e.rules;if((o=a)&&(o=!((o=a[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var s,c=a.length;o<c&&(s=a[o]);o++)i=t(s,n,i)}else n=n?e.cssText:(n=(n=e.cssText).replace(Mn.Ma,"").replace(Mn.Qa,"")).replace(Mn.yb,"").replace(Mn.Db,""),(i=n.trim())&&(i="  "+i+"\\n")}return i&&(e.selector&&(r+=e.selector+" {\\n"),r+=i,e.selector&&(r+="}\\n\\n")),r}(t,En)):""}function Rt(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Tt(t.textContent)),t.__cssRules||null}function Ct(t){return!!t.parent&&t.parent.type===Tn.na}function Lt(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===Tn.MEDIA_RULE){var a=t.selector.match(Pn);a&&(window.matchMedia(a[1]).matches||(i=!0))}if(o===Tn.STYLE_RULE?e(t):n&&o===Tn.na?n(t):o===Tn.Ea&&(i=!0),(t=t.rules)&&!i){var s;for(i=0,o=t.length;i<o&&(s=t[i]);i++)Lt(s,e,n,r)}}}function Pt(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Nt(i,n,r),i}function Nt(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),On?t.compareDocumentPosition(On)===Node.DOCUMENT_POSITION_PRECEDING&&(On=t):On=t}function Ot(t,e){Sn?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function It(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,$:n}}function Dt(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o,a=i.getRootNode(),s=[];(o=i).classList?s=Array.from(o.classList):o instanceof window.SVGElement&&o.hasAttribute("class")&&(s=o.getAttribute("class").split(/\\s+/)),(o=-1<(s=(o=s).indexOf(Jn.c))?o[s+1]:"")&&a===i.ownerDocument?Jn.a(i,o,!0):a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host)&&(o!==(a=It(a).is)&&(o&&Jn.a(i,o,!0),Jn.a(i,a)))}}}}function Ft(t){(t=sr[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Ut(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function Ht(t){requestAnimationFrame(function(){lr?lr(t):(ur||(ur=new Promise(function(t){ar=t}),"complete"===document.readyState?ar():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&ar()})),ur.then(function(){t&&t()}))})}!function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,a=n,s=Object.getOwnPropertyNames(a),c=0;c<s.length;c++)o[n=s[c]]=a[n];return t})}(window.WebComponents),function(){function t(){}var e="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var t=Document.prototype.importNode;Document.prototype.importNode=function(){var e=t.apply(this,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=this.createDocumentFragment();return n.appendChild(e),n}return e}}();var n=Node.prototype.cloneNode,r=Document.prototype.createElement,i=Document.prototype.importNode,o=function(){if(!e){var t=document.createElement("template"),n=document.createElement("template");return n.content.appendChild(document.createElement("div")),t.content.appendChild(n),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(e){var a=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case"\xa0":return"&nbsp;"}},s=function(e){Object.defineProperty(e,"innerHTML",{get:function(){for(var t="",e=this.content.firstChild;e;e=e.nextSibling)t+=e.outerHTML||e.data.replace(d,a);return t},set:function(e){for(c.body.innerHTML=e,t.b(c);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;c.body.firstChild;)this.content.appendChild(c.body.firstChild)},configurable:!0})},c=document.implementation.createHTMLDocument("template"),u=!0,l=document.createElement("style");l.textContent="template{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");t.O=function(e){if(!e.content){e.content=c.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(p)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.a(this,e)},u)try{s(e)}catch(t){u=!1}t.b(e.content)}},s(t.prototype),t.b=function(e){for(var n,r=0,i=(e=e.querySelectorAll("template")).length;r<i&&(n=e[r]);r++)t.O(n)},document.addEventListener("DOMContentLoaded",function(){t.b(document)}),Document.prototype.createElement=function(){var e=r.apply(this,arguments);return"template"===e.localName&&t.O(e),e};var d=/[&\\u00A0<>]/g}(e||o)&&(t.a=function(t,e){var r=n.call(t,!1);return this.O&&this.O(r),e&&(r.content.appendChild(n.call(t.content,!0)),this.ya(r.content,t.content)),r},t.prototype.cloneNode=function(e){return t.a(this,e)},t.ya=function(t,e){if(e.querySelectorAll){e=e.querySelectorAll("template");for(var n,r,i=0,o=(t=t.querySelectorAll("template")).length;i<o;i++)r=e[i],n=t[i],this.O&&this.O(r),n.parentNode.replaceChild(r.cloneNode(!0),n)}},Node.prototype.cloneNode=function(e){var r;if(this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();r=this.ownerDocument.importNode(this,!0)}else r=n.call(this,e);return e&&t.ya(r,this),r},Document.prototype.importNode=function(e,n){if("template"===e.localName)return t.a(e,n);var r=i.call(this,e,n);return n&&t.ya(r,e),r},o&&(window.HTMLTemplateElement.prototype.cloneNode=function(e){return t.a(this,e)})),e&&(window.HTMLTemplateElement=t)}(),window,t.exports=function(){function t(t,e){L[M]=t,L[M+1]=e,2===(M+=2)&&(A?A(o):P())}function i(){var t=setTimeout;return function(){return t(o,1)}}function o(){for(var t=0;t<M;t+=2)(0,L[t])(L[t+1]),L[t]=void 0,L[t+1]=void 0;M=0}function a(e,n){var r=arguments,i=this,o=new this.constructor(c);void 0===o[N]&&_(o);var a=i.m;return a?function(){var e=r[a-1];t(function(){return b(a,o,e,i.l)})}():v(i,o,e,n),o}function s(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(c);return p(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return F.error=t,F}}function l(e,n,r){t(function(t){var e=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(r,n,function(r){e||(e=!0,n!==r?p(t,r):f(t,r))},function(n){e||(e=!0,m(t,n))});!e&&i&&(e=!0,m(t,i))},e)}function h(t,e,n){e.constructor===t.constructor&&n===a&&e.constructor.resolve===s?function(t,e){e.m===I?f(t,e.l):e.m===D?m(t,e.l):v(e,void 0,function(e){return p(t,e)},function(e){return m(t,e)})}(t,e):n===F?(m(t,F.error),F.error=null):void 0===n?f(t,e):"function"==typeof n?l(t,e,n):f(t,e)}function p(t,e){t===e?m(t,new TypeError("You cannot resolve a promise with itself")):"function"==typeof e||"object"==typeof e&&null!==e?h(t,e,u(e)):f(t,e)}function d(t){t.Ka&&t.Ka(t.l),g(t)}function f(e,n){e.m===O&&(e.l=n,e.m=I,0!==e.W.length&&t(g,e))}function m(e,n){e.m===O&&(e.m=D,e.l=n,t(d,e))}function v(e,n,r,i){var o=e.W,a=o.length;e.Ka=null,o[a]=n,o[a+I]=r,o[a+D]=i,0===a&&e.m&&t(g,e)}function g(t){var e=t.W,n=t.m;if(0!==e.length){for(var r,i,o=t.l,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?b(n,r,i,o):i(o);t.W.length=0}}function y(){this.error=null}function b(t,e,n,r){var i="function"==typeof n,o=void 0,a=void 0,s=void 0,c=void 0;if(i){var u;try{u=n(r)}catch(t){U.error=t,u=U}if((o=u)===U?(c=!0,a=o.error,o.error=null):s=!0,e===o)return void m(e,new TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;e.m!==O||(i&&s?p(e,o):c?m(e,a):t===I?f(e,o):t===D&&m(e,o))}function _(t){t[N]=H++,t.m=void 0,t.l=void 0,t.W=[]}function x(t,e){this.lb=t,this.I=new t(c),this.I[N]||_(this.I),T(e)?(this.kb=e,this.length=e.length,this.ba=e.length,this.l=Array(this.length),0===this.length?f(this.I,this.l):(this.length=this.length||0,this.jb(),0===this.ba&&f(this.I,this.l))):m(this.I,Error("Array Methods must be provided an Array"))}function w(t){if(this[N]=H++,this.l=this.m=void 0,this.W=[],c!==t){if("function"!=typeof t)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof w))throw new TypeError("Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.");!function(t,e){try{e(function(e){p(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t)}}var E=void 0,T=E=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},M=0,S=void 0,A=void 0,R=(C=(E="undefined"!=typeof window?window:void 0)||{}).MutationObserver||C.WebKitMutationObserver,C="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,L=Array(1e3),P=void 0,P="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r)?function(){return r.Mb(o)}:R?function(){var t=0,e=new R(o),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():C?function(){var t=new MessageChannel;return t.port1.onmessage=o,function(){return t.port2.postMessage(0)}}():E?i():function(){try{var t=n(!function(){var t=new Error(\'Cannot find module "vertx"\');throw t.code="MODULE_NOT_FOUND",t}());return void 0!==(S=t.Ob||t.Nb)?function(){S(o)}:i()}catch(t){return i()}}(),N=Math.random().toString(36).substring(16),O=void 0,I=1,D=2,F=new y,U=new y,H=0;return x.prototype.jb=function(){for(var t=this.length,e=this.kb,n=0;this.m===O&&n<t;n++)this.ib(e[n],n)},x.prototype.ib=function(t,e){var n=this.lb,r=n.resolve;r===s?(r=u(t))===a&&t.m!==O?this.va(t.m,e,t.l):"function"!=typeof r?(this.ba--,this.l[e]=t):n===w?(h(n=new n(c),t,r),this.wa(n,e)):this.wa(new n(function(e){return e(t)}),e):this.wa(r(t),e)},x.prototype.va=function(t,e,n){var r=this.I;r.m===O&&(this.ba--,t===D?m(r,n):this.l[e]=n),0===this.ba&&f(r,this.l)},x.prototype.wa=function(t,e){var n=this;v(t,void 0,function(t){return n.va(I,e,t)},function(t){return n.va(D,e,t)})},w.g=function(t){return new x(this,t).I},w.h=function(t){var e=this;return new e(T(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})},w.resolve=s,w.i=function(t){var e=new this(c);return m(e,t),e},w.f=function(t){A=t},w.c=function(e){t=e},w.b=t,w.prototype={constructor:w,then:a,catch:function(t){return this.then(null,t)}},w.a=function(){var t=void 0;if(void 0!==e)t=e;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===r&&!n.Kb)return}t.Promise=w},w.Promise=w,w.a(),w}(),function(t){function e(t,e){if("function"==typeof window.CustomEvent)return new CustomEvent(t,e);var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n}function n(t){if(c)return t.ownerDocument!==document?t.ownerDocument:null;var e=t.__importDoc;if(!e&&t.parentNode){if("function"==typeof(e=t.parentNode).closest)e=e.closest("link[rel=import]");else for(;!a(e)&&(e=e.parentNode););t.__importDoc=e}return e}function r(t){function e(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",e),t())}document.addEventListener("readystatechange",e),e()}function i(t){r(function(){return function(t){var e=document.querySelectorAll("link[rel=import]:not(import-dependency)"),n=e.length;if(n)for(var r,i=0,a=e.length;i<a&&(r=e[i]);i++)o(r,function(){--n||t()});else t()}(function(){return t&&t()})})}function o(t,e){if(t.__loaded)e&&e();else if("script"!==t.localName||t.src){var n=function(r){t.removeEventListener(r.type,n),t.__loaded=!0,e&&e()};t.addEventListener("load",n),v&&"style"===t.localName||t.addEventListener("error",n)}else t.__loaded=!0,e&&e()}function a(t){return t.nodeType===Node.ELEMENT_NODE&&"link"===t.localName&&"import"===t.rel}function s(){var t=this;this.a={},this.b=0,this.f=new MutationObserver(function(e){return t.o(e)}),this.f.observe(document.head,{childList:!0,subtree:!0}),this.c(document)}var c="import"in document.createElement("link"),u=null;!1=="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return u||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var l=/(^\\/)|(^#)|(^[\\w-\\d]*:)/,h=/(url\\()([^)]*)(\\))/g,p=/(@import[\\s]+(?!url\\())([^;]*)(;)/g,d=/(<link[^>]*)(rel=[\'|"]?stylesheet[\'|"]?[^>]*>)/g,f={sb:function(t,e){if(t.href&&t.setAttribute("href",f.Da(t.getAttribute("href"),e)),t.src&&t.setAttribute("src",f.Da(t.getAttribute("src"),e)),"style"===t.localName){var n=f.Ua(t.textContent,e,h);t.textContent=f.Ua(n,e,p)}},Ua:function(t,e,n){return t.replace(n,function(t,n,r,i){return t=r.replace(/["\']/g,""),e&&(t=f.Va(t,e)),n+"\'"+t+"\'"+i})},Da:function(t,e){return t&&l.test(t)?t:f.Va(t,e)},Va:function(t,e){if(void 0===f.ra){f.ra=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",f.ra="http://a/c%20d"===n.href}catch(t){}}return f.ra?new URL(t,e).href:((n=f.gb)||(n=document.implementation.createHTMLDocument("temp"),f.gb=n,n.Ga=n.createElement("base"),n.head.appendChild(n.Ga),n.Fa=n.createElement("a")),n.Ga.href=e,n.Fa.href=t,n.Fa.href||t)}},m={async:!0,load:function(t,e,n){if(t)if(t.match(/^data:/)){var r=(t=t.split(","))[1];r=-1<t[0].indexOf(";base64")?atob(r):decodeURIComponent(r);e(r)}else{var i=new XMLHttpRequest;i.open("GET",t,m.async),i.onload=function(){var t=i.getResponseHeader("Location");t&&!t.indexOf("/")&&(t=(location.origin||location.protocol+"//"+location.host)+t);var r=i.response||i.responseText;304===i.status||!i.status||200<=i.status&&300>i.status?e(r,t):n(r)},i.send()}else n("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\\/\\d./i.test(navigator.userAgent);if(s.prototype.c=function(t){for(var e=0,n=(t=t.querySelectorAll("link[rel=import]")).length;e<n;e++)this.h(t[e])},s.prototype.h=function(t){var e=this,n=t.href;if(void 0!==this.a[n]){var r=this.a[n];r&&r.__loaded&&(t.import=r,this.g(t))}else this.b++,this.a[n]="pending",m.load(n,function(t,r){t=e.s(t,r||n),e.a[n]=t,e.b--,e.c(t),e.i()},function(){e.a[n]=null,e.b--,e.i()})},s.prototype.s=function(t,e){if(!t)return document.createDocumentFragment();if(v&&(t=t.replace(d,function(t,e,n){return-1===t.indexOf("type=")?e+" type=import-disable "+n:t})),(n=document.createElement("template")).innerHTML=t,n.content)t=n.content;else for(t=document.createDocumentFragment();n.firstChild;)t.appendChild(n.firstChild);(n=t.querySelector("base"))&&(e=f.Da(n.getAttribute("href"),e),n.removeAttribute("href"));for(var n,r,i=0,a=0,s=(n=t.querySelectorAll(\'link[rel=import], link[rel=stylesheet][href][type=import-disable],\\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\\n    script:not([type]), script[type="application/javascript"],\\n    script[type="text/javascript"]\')).length;a<s&&(r=n[a]);a++)o(r),f.sb(r,e),r.setAttribute("import-dependency",""),"script"===r.localName&&!r.src&&r.textContent&&(r.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(r.textContent+"\\n//# sourceURL="+e+(i?"-"+i:"")+".js\\n")),r.textContent="",i++);return t},s.prototype.i=function(){var t=this;if(!this.b){this.f.disconnect(),this.flatten(document);var e=!1,n=!1,r=function(){n&&e&&(t.c(document),t.b||(t.f.observe(document.head,{childList:!0,subtree:!0}),t.j()))};this.A(function(){n=!0,r()}),this.u(function(){e=!0,r()})}},s.prototype.flatten=function(t){for(var e,n=0,r=(t=t.querySelectorAll("link[rel=import]")).length;n<r&&(e=t[n]);n++){var i=this.a[e.href];(e.import=i)&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.a[e.href]=e,e.readyState="loading",e.import=e,this.flatten(i),e.appendChild(i))}},s.prototype.u=function(t){var e=document.querySelectorAll("script[import-dependency]"),n=e.length;!function r(i){if(i<n){var a=e[i],s=document.createElement("script");a.removeAttribute("import-dependency");for(var c=0,l=a.attributes.length;c<l;c++)s.setAttribute(a.attributes[c].name,a.attributes[c].value);u=s,a.parentNode.replaceChild(s,a),o(s,function(){u=null,r(i+1)})}else t()}(0)},s.prototype.A=function(t){var e=document.querySelectorAll("style[import-dependency],\\n    link[rel=stylesheet][import-dependency]"),r=e.length;if(r){for(var i=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),a={},s=0,c=e.length;s<c&&(a.w=e[s]);a={w:a.w},s++)if(o(a.w,function(e){return function(){e.w.removeAttribute("import-dependency"),--r||t()}}(a)),i&&a.w.parentNode!==document.head){var u=document.createElement(a.w.localName);for(u.__appliedElement=a.w,u.setAttribute("type","import-placeholder"),a.w.parentNode.insertBefore(u,a.w.nextSibling),u=n(a.w);u&&n(u);)u=n(u);u.parentNode!==document.head&&(u=null),document.head.insertBefore(a.w,u),a.w.removeAttribute("type")}}else t()},s.prototype.j=function(){for(var t,e=document.querySelectorAll("link[rel=import]"),n=e.length-1;0<=n&&(t=e[n]);n--)this.g(t)},s.prototype.g=function(t){t.__loaded||(t.__loaded=!0,t.import&&(t.import.readyState="complete"),t.dispatchEvent(e(t.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))},s.prototype.o=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.addedNodes)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];i&&i.nodeType===Node.ELEMENT_NODE&&(a(i)?this.h(i):this.c(i))}}},c){for(var g,y=document.querySelectorAll("link[rel=import]"),b=0,_=y.length;b<_&&(g=y[b]);b++)g.import&&"loading"===g.import.readyState||(g.__loaded=!0);y=function(t){a(t=t.target)&&(t.__loaded=!0)},document.addEventListener("load",y,!0),document.addEventListener("error",y,!0)}else{var x=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!x||x.configurable?Node:Element).prototype,"baseURI",{get:function(){var t=a(this)?this:n(this);return t?t.href:x&&x.get?x.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0}),r(function(){return new s})}i(function(){return document.dispatchEvent(e("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))}),t.useNative=c,t.whenReady=i,t.importForElement=n}(window.HTMLImports=window.HTMLImports||{}),function(){window.WebComponents=window.WebComponents||{flags:{}};var t=document.querySelector(\'script[src*="webcomponents-lite.js"]\'),e=/wc-(.+)/,n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var r;(t=t.split("="))[0]&&(r=t[0].match(e))&&(n[r[1]]=t[1]||!0)}),t)for(var r,i=0;r=t.attributes[i];i++)"src"!==r.name&&(n[r.name]=r.value||!0);n.log&&n.log.split?(t=n.log.split(","),n.log={},t.forEach(function(t){n.log[t]=!0})):n.log={}}window.WebComponents.flags=n,(t=n.shadydom)&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=t),(t=n.register||n.ce)&&window.customElements&&(window.customElements.forcePolyfill=t)}();var Bt=window.ShadyDOM||{};Bt.ub=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var zt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");Bt.X=!!(zt&&zt.configurable&&zt.get),Bt.Pa=Bt.force||!Bt.ub;var kt=Element.prototype,Gt=kt.matches||kt.matchesSelector||kt.mozMatchesSelector||kt.msMatchesSelector||kt.oMatchesSelector||kt.webkitMatchesSelector,jt=document.createTextNode(""),Vt=0,Wt=[];new MutationObserver(function(){for(;Wt.length;)try{Wt.shift()()}catch(t){throw jt.textContent=Vt++,t}}).observe(jt,{characterData:!0});var Xt,qt=[];R.list=qt,x.prototype.Bb=function(){var t=this;this.a||(this.a=!0,S(function(){t.b()}))},x.prototype.b=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ea.forEach(function(e){e(t)})}},x.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var Yt=Element.prototype.appendChild,Zt=Element.prototype.insertBefore,Jt=Element.prototype.removeChild,Kt=Element.prototype.setAttribute,Qt=Element.prototype.removeAttribute,$t=Element.prototype.cloneNode,te=Document.prototype.importNode,ee=Element.prototype.addEventListener,ne=Element.prototype.removeEventListener,re=Window.prototype.addEventListener,ie=Window.prototype.removeEventListener,oe=Element.prototype.dispatchEvent,ae=Object.freeze({appendChild:Yt,insertBefore:Zt,removeChild:Jt,setAttribute:Kt,removeAttribute:Qt,cloneNode:$t,importNode:te,addEventListener:ee,removeEventListener:ne,Pb:re,Qb:ie,dispatchEvent:oe}),se=/[&\\u00A0"]/g,ce=/[&\\u00A0<>]/g,ue=L("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=L("style script xmp iframe noembed noframes plaintext noscript".split(" ")),he=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),pe=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),de=Object.freeze({parentNode:N,firstChild:O,lastChild:I,previousSibling:D,nextSibling:F,childNodes:U,parentElement:H,firstElementChild:B,lastElementChild:z,previousElementSibling:k,nextElementSibling:G,children:j,innerHTML:V,textContent:W}),fe=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),me=document.implementation.createHTMLDocument("inert").createElement("div"),ve=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=this.__shady&&this.__shady.parentNode;return t&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:H(this)},configurable:!0},parentNode:{get:function(){var t=this.__shady&&this.__shady.parentNode;return void 0!==t?t:N(this)},configurable:!0},nextSibling:{get:function(){var t=this.__shady&&this.__shady.nextSibling;return void 0!==t?t:F(this)},configurable:!0},previousSibling:{get:function(){var t=this.__shady&&this.__shady.previousSibling;return void 0!==t?t:D(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return G(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return k(this)},configurable:!0}},ye={childNodes:{get:function(){var t;if(this.__shady&&void 0!==this.__shady.firstChild){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)this.__shady.childNodes.push(e)}t=this.__shady.childNodes}else t=U(this);return t.item=function(e){return t[e]},t},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=this.__shady&&this.__shady.firstChild;return void 0!==t?t:O(this)},configurable:!0},lastChild:{get:function(){var t=this.__shady&&this.__shady.lastChild;return void 0!==t?t:I(this)},configurable:!0},textContent:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return W(this)},set:function(t){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=t;else{for(;this.firstChild;)this.removeChild(this.firstChild);this.appendChild(document.createTextNode(t))}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return B(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return z(this)},configurable:!0},children:{get:function(){var t;return(t=this.__shady&&void 0!==this.__shady.firstChild?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):j(this)).item=function(e){return t[e]},t},configurable:!0},innerHTML:{get:function(){var t="template"===this.localName?this.content:this;return this.__shady&&void 0!==this.__shady.firstChild?P(t):V(t)},set:function(t){for(var e="template"===this.localName?this.content:this;e.firstChild;)e.removeChild(e.firstChild);for(fe&&fe.set?fe.set.call(me,t):me.innerHTML=t;me.firstChild;)e.appendChild(me.firstChild)},configurable:!0}},be={shadowRoot:{get:function(){return this.__shady&&this.__shady.root||null},set:function(t){this.__shady=this.__shady||{},this.__shady.root=t},configurable:!0}},_e={activeElement:{get:function(){var t;if((t=ve&&ve.get?ve.get.call(document):Bt.X?void 0:document.activeElement)&&t.nodeType){var e=!!w(this);if(this===document||e&&this.host!==t&&this.host.contains(t)){for(e=E(t);e&&e!==this;)e=E(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}},xe=Bt.X?function(){}:function(t){t.__shady&&t.__shady.fb||(t.__shady=t.__shady||{},t.__shady.fb=!0,X(t,ge,!0))},we=Bt.X?function(){}:function(t){t.__shady&&t.__shady.cb||(t.__shady=t.__shady||{},t.__shady.cb=!0,X(t,ye,!0),X(t,be,!0))},Ee=null,Te={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Me={get composed(){return!1!==this.isTrusted&&void 0===this.oa&&(this.oa=Te[this.type]),this.oa||!1},composedPath:function(){return this.Ha||(this.Ha=at(this.__target,this.composed)),this.Ha},get target(){return st(this.currentTarget,this.composedPath())},get relatedTarget(){return this.Ia?(this.Ja||(this.Ja=at(this.Ia,!0)),st(this.currentTarget,this.Ja)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.pa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.pa=this.bb=!0}},Se={focus:!0,blur:!0},Ae=ct(window.Event),Re=ct(window.CustomEvent),Ce=ct(window.MouseEvent),Le="function"==typeof Event?Event:function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n};b.prototype.tb=function(){return this.root.querySelectorAll("slot")},b.prototype.Aa=function(t){return t.localName&&"slot"==t.localName},b.prototype.xa=function(){return this.root.za()?this.g(this.c()):[]},b.prototype.c=function(){for(var t=[],e=0,n=this.root.host.firstChild;n;n=n.nextSibling)t[e++]=n;return t},b.prototype.g=function(t){for(var e,n=[],r=this.root.ta(),i=0,o=r.length;i<o&&(e=r[i]);i++){this.f(e,t);var a=e.parentNode;(a=a&&a.__shady&&a.__shady.root)&&a.za()&&n.push(a)}for(r=0;r<t.length;r++)(i=t[r])&&(i.__shady=i.__shady||{},i.__shady.assignedSlot=void 0,(o=N(i))&&Jt.call(o,i));return n},b.prototype.f=function(t,e){var n=t.__shady.assignedNodes;n&&this.La(t,!0),t.__shady.assignedNodes=[];for(var r,i=!1,o=!1,a=0,s=e.length;a<s;a++)(r=e[a])&&this.h(r,t)&&(r.__shady.ua!=t&&(i=!0),this.b(r,t),e[a]=void 0,o=!0);if(!o)for(e=t.childNodes,o=0;o<e.length;o++)(r=e[o]).__shady.ua!=t&&(i=!0),this.b(r,t);if(n){for(r=0;r<n.length;r++)n[r].__shady.ua=null;t.__shady.assignedNodes.length<n.length&&(i=!0)}this.i(t),i&&this.a(t)},b.prototype.La=function(t,e){var n=t.__shady.assignedNodes;if(n)for(var r=0;r<n.length;r++){var i=n[r];e&&(i.__shady.ua=i.__shady.assignedSlot),i.__shady.assignedSlot===t&&(i.__shady.assignedSlot=null)}},b.prototype.h=function(t,e){return e=(e=e.getAttribute("name"))?e.trim():"",(t=(t=t.getAttribute&&t.getAttribute("slot"))?t.trim():"")==e},b.prototype.b=function(t,e){e.__shady.assignedNodes.push(t),t.__shady.assignedSlot=e},b.prototype.i=function(t){var e=t.__shady.assignedNodes;t.__shady.P=[];for(var n,r=0;r<e.length&&(n=e[r]);r++)if(this.Aa(n)){var i=n.__shady.P;if(i)for(var o=0;o<i.length;o++)t.__shady.P.push(i[o])}else t.__shady.P.push(e[r])},b.prototype.a=function(t){oe.call(t,new Le("slotchange")),t.__shady.assignedSlot&&this.a(t.__shady.assignedSlot)},b.prototype.ga=function(t){return!t.__shady.assignedSlot};var Pe,Ne={};y.prototype=Object.create(DocumentFragment.prototype),y.prototype.i=function(t){this.eb="ShadyRoot",_(t),_(this),t.shadowRoot=this,this.host=t,this.sa=this.N=!1,this.C=new b(this),this.update()},y.prototype.update=function(){var t=this;this.N||(this.N=!0,A(function(){return t.Ta()}))},y.prototype.h=function(){for(var t=this,e=this;e;)e.N&&(t=e),e=e.nb();return t},y.prototype.nb=function(){var t=this.host.getRootNode();if(w(t))for(var e,n=this.host.childNodes,r=0;r<n.length;r++)if(e=n[r],this.C.Aa(e))return t},y.prototype.Ta=function(){this.N&&this.h()._render()},y.prototype._render=function(){this.sa=this.N=!1,this.ca||this.f(),this.ca=!1,this.xa(),this.j()},y.prototype.xa=function(){for(var t=this.C.xa(),e=0;e<t.length;e++)t[e]._render()},y.prototype.f=function(){var t=this.a;if(t)for(var e,n=0;n<t.length;n++)(e=t[n]).getRootNode()!==this&&this.C.La(e);for(t=this.a=this.C.tb(),n=0;n<t.length;n++)(e=t[n]).__shady=e.__shady||{},_(e),_(e.parentNode)},y.prototype.j=function(){this.g()},y.prototype.g=function(){this.c(this.host,this.b(this.host));for(var t,e,n=this.ta(),r=0,i=n.length;r<i&&(t=n[r]);r++)(e=t.parentNode)!==this.host&&e!==this&&this.c(e,this.b(e))},y.prototype.b=function(t){var e=[];t=(t.__shady&&t.__shady.root||t).childNodes;for(var n=0;n<t.length;n++){var r=t[n];if(this.C.Aa(r))for(var i=r.__shady.P||(r.__shady.P=[]),o=0;o<i.length;o++){var a=i[o];this.ga(r,a)&&e.push(a)}else e.push(r)}return e},y.prototype.ga=function(t,e){return this.C.ga(t,e)},y.prototype.c=function(t,e){for(var n,r=U(t),i=function(t,e,n,r){var i=0,o=0,a=0,s=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(a=0;a<c;a++)if(t[a]!==n[a])break t;a=c}if(e==t.length&&r==n.length){s=t.length;for(var u=n.length,l=0;l<c-a&&vt(t[--s],n[--u]);)l++;s=l}if(o+=a,r-=s,!((e-=s)-(i+=a)||r-o))return[];if(i==e){for(e=mt(i,0);o<r;)e.Z.push(n[o++]);return[e]}if(o==r)return[mt(i,e-i)];for(r=r-(a=o)+1,s=e-(c=i)+1,e=Array(r),u=0;u<r;u++)e[u]=Array(s),e[u][0]=u;for(u=0;u<s;u++)e[0][u]=u;for(u=1;u<r;u++)for(l=1;l<s;l++)if(t[c+l-1]===n[a+u-1])e[u][l]=e[u-1][l-1];else{var h=e[u-1][l]+1,p=e[u][l-1]+1;e[u][l]=h<p?h:p}for(c=e.length-1,a=e[0].length-1,r=e[c][a],t=[];0<c||0<a;)c?a?(s=e[c-1][a-1],(h=(u=e[c-1][a])<(l=e[c][a-1])?u<s?u:s:l<s?l:s)==s?(s==r?t.push(0):(t.push(1),r=s),c--,a--):h==u?(t.push(3),c--,r=u):(t.push(2),a--,r=l)):(t.push(3),c--):(t.push(2),a--);for(t.reverse(),e=void 0,c=[],a=0;a<t.length;a++)switch(t[a]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=mt(i,0)),e.da++,i++,e.Z.push(n[o]),o++;break;case 2:e||(e=mt(i,0)),e.da++,i++;break;case 3:e||(e=mt(i,0)),e.Z.push(n[o]),o++}return e&&c.push(e),c}(e,e.length,r,r.length),o=0,a=0;o<i.length&&(n=i[o]);o++){for(var s,c=0;c<n.Z.length&&(s=n.Z[c]);c++)N(s)===t&&Jt.call(t,s),r.splice(n.index+a,1);a-=n.da}for(o=0;o<i.length&&(n=i[o]);o++)for(a=r[n.index],c=n.index;c<n.index+n.da;c++)s=e[c],Zt.call(t,s,a),r.splice(c,0,s)},y.prototype.za=function(){return!(!this.a||!this.a.length)},y.prototype.ta=function(){return this.a||this.f(),this.a},y.prototype.addEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.addEventListener(t,e,n)},y.prototype.removeEventListener=function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.qa=this,this.host.removeEventListener(t,e,n)},y.prototype.getElementById=function(t){return this.querySelector("#"+t)},X(Pe=y.prototype,ye,!0),X(Pe,_e,!0);var Oe={addEventListener:pt.bind(window),removeEventListener:dt.bind(window)},Ie={addEventListener:pt,removeEventListener:dt,appendChild:function(t){return ot(this,t)},insertBefore:function(t,e){return ot(this,t,e)},removeChild:function(t){if(t.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+t);if(!Z(t)){var e=w(this)?this.host:this;e===N(t)&&Jt.call(e,t)}return J(this,null,t),t},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},cloneNode:function(t){var e;if("template"==this.localName)e=$t.call(this,t);else if(e=$t.call(this,!1),t){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return K(this)},get isConnected(){var t=this.ownerDocument;if(t&&t.contains&&t.contains(this)||(t=t.documentElement)&&t.contains&&t.contains(this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(t instanceof y?t.host:void 0);return!!(t&&t instanceof Document)},dispatchEvent:function(t){return R(),oe.call(this,t)}},De={get assignedSlot(){return gt(this)}},Fe={querySelector:function(t){return rt(this,function(e){return Gt.call(e,t)},function(t){return!!t})[0]||null},querySelectorAll:function(t){return rt(this,function(e){return Gt.call(e,t)})}},Ue={assignedNodes:function(t){if("slot"===this.localName)return it(this),this.__shady&&(t&&t.flatten?this.__shady.P:this.__shady.assignedNodes)||[]}},He=M({setAttribute:function(t,e){Ee||(Ee=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Ee&&"class"===t?Ee.setElementClass(this,e):(Kt.call(this,t,e),nt(this,t))},removeAttribute:function(t){Qt.call(this,t),nt(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new y(Ne,this)},get slot(){return this.getAttribute("slot")},set slot(t){this.setAttribute("slot",t)},get assignedSlot(){return gt(this)}},Fe,Ue);Object.defineProperties(He,be);var Be=M({importNode:function(t,e){return function t(e,n){if(e.ownerDocument!==document)return te.call(document,e,n);var r=te.call(document,e,!1);if(n){e=e.childNodes,n=0;for(var i;n<e.length;n++)i=t(e[n],!0),r.appendChild(i)}return r}(t,e)},getElementById:function(t){return this.querySelector("#"+t)}},Fe);Object.defineProperties(Be,{_activeElement:_e.activeElement});var ze=HTMLElement.prototype.blur,ke=M({blur:function(){var t=this.shadowRoot;(t=t&&t.activeElement)?t.blur():ze.call(this)}});Bt.Pa&&(window.ShadyDOM={inUse:Bt.Pa,patch:function(t){return t},isShadyRoot:w,enqueue:A,flush:R,settings:Bt,filterMutations:function(t,e){var n=e.getRootNode();return t.map(function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter(function(t){return n===t.getRootNode()})).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t}).filter(function(t){return t})},observeChildren:function(t,e){t.__shady=t.__shady||{},t.__shady.Y||(t.__shady.Y=new x),t.__shady.Y.ea.add(e);var n=t.__shady.Y;return{hb:e,M:n,mb:t,takeRecords:function(){return n.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.M;e&&(e.ea.delete(t.hb),e.ea.size||(t.mb.__shady.Y=null))},nativeMethods:ae,nativeTree:de},window.Event=Ae,window.CustomEvent=Re,window.MouseEvent=Ce,function(){for(var t in Se)window.addEventListener(t,function(t){t.__target||(ft(t),lt(t))},!0)}(),function(){var t=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;yt(window.Node.prototype,Ie),yt(window.Window.prototype,Oe),yt(window.Text.prototype,De),yt(window.DocumentFragment.prototype,Fe),yt(window.Element.prototype,He),yt(window.Document.prototype,Be),window.HTMLSlotElement&&yt(window.HTMLSlotElement.prototype,Ue),yt(t.prototype,ke),Bt.X&&(q(window.Node.prototype),q(window.Text.prototype),q(window.DocumentFragment.prototype),q(window.Element.prototype),q(t.prototype),q(window.Document.prototype),window.HTMLSlotElement&&q(window.HTMLSlotElement.prototype))}(),window.ShadowRoot=y);var Ge=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));g.prototype.L=function(t,e){this.s.set(t,e),this.o.set(e.constructor,e)},g.prototype.f=function(t){return this.s.get(t)},g.prototype.K=function(t){return this.o.get(t)},g.prototype.u=function(t){this.h=!0,this.i.push(t)},g.prototype.j=function(t){var e=this;this.h&&wt(t,function(t){return e.g(t)})},g.prototype.g=function(t){if(this.h&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.i.length;e++)this.i[e](t)}},g.prototype.b=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state?this.connectedCallback(n):this.A(n)}},g.prototype.a=function(t){var e=[];for(wt(t,function(t){return e.push(t)}),t=0;t<e.length;t++){var n=e[t];1===n.__CE_state&&this.disconnectedCallback(n)}},g.prototype.c=function(t,e){var n=this,r=[];if(wt(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var i=t.import;i instanceof Node&&"complete"===i.readyState?(i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0):t.addEventListener("load",function(){var r=t.import;r.__CE_documentLoadHandled||(r.__CE_documentLoadHandled=!0,r.__CE_isImportDocument=!0,r.__CE_hasRegistry=!0,e.delete(r),n.c(r,e))})}else r.push(t)},e=e||new Set),this.h)for(t=0;t<r.length;t++)this.g(r[t]);for(t=0;t<r.length;t++)this.A(r[t])},g.prototype.A=function(t){if(void 0===t.__CE_state){var e=this.f(t.localName);if(e){e.constructionStack.push(t);var n=e.constructor;try{try{if(new n!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{e.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=e,e.attributeChangedCallback)for(e=e.observedAttributes,n=0;n<e.length;n++){var r=e[n],i=t.getAttribute(r);null!==i&&this.attributeChangedCallback(t,r,null,i,null)}_t(t)&&this.connectedCallback(t)}}},g.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},g.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},g.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},v.prototype.c=function(){this.M&&this.M.disconnect()},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||this.c(),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)this.b.c(n[r])},m.prototype.resolve=function(t){if(this.a)throw Error("Already resolved.");this.a=t,this.b&&this.b(t)},f.prototype.define=function(t,e){var n,r,i,o,a,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bt(t))throw new SyntaxError("The element name \'"+t+"\' is not valid.");if(this.a.f(t))throw Error("A custom element with name \'"+t+"\' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The \'"+t+"\' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor\'s prototype is not an object.");n=c("connectedCallback"),r=c("disconnectedCallback"),i=c("adoptedCallback"),o=c("attributeChangedCallback"),a=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}this.a.L(t,{localName:t,constructor:e,connectedCallback:n,disconnectedCallback:r,adoptedCallback:i,attributeChangedCallback:o,observedAttributes:a,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g(function(){return s.j()}))},f.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<this.c.length;){var t=this.c.shift();(t=this.h.get(t))&&t.resolve(void 0)}},f.prototype.get=function(t){if(t=this.a.f(t))return t.constructor},f.prototype.whenDefined=function(t){if(!bt(t))return Promise.reject(new SyntaxError("\'"+t+"\' is not a valid custom element name."));var e=this.h.get(t);return e?e.c:(e=new m,this.h.set(t,e),this.a.f(t)&&-1===this.c.indexOf(t)&&e.resolve(void 0),e.c)},f.prototype.o=function(t){this.i.c();var e=this.g;this.g=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=f,f.prototype.define=f.prototype.define,f.prototype.get=f.prototype.get,f.prototype.whenDefined=f.prototype.whenDefined,f.prototype.polyfillWrapFlushCallback=f.prototype.o;var je=window.Document.prototype.createElement,Ve=window.Document.prototype.createElementNS,We=window.Document.prototype.importNode,Xe=window.Document.prototype.prepend,qe=window.Document.prototype.append,Ye=window.Node.prototype.cloneNode,Ze=window.Node.prototype.appendChild,Je=window.Node.prototype.insertBefore,Ke=window.Node.prototype.removeChild,Qe=window.Node.prototype.replaceChild,$e=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),tn=window.Element.prototype.attachShadow,en=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nn=window.Element.prototype.getAttribute,rn=window.Element.prototype.setAttribute,on=window.Element.prototype.removeAttribute,an=window.Element.prototype.getAttributeNS,sn=window.Element.prototype.setAttributeNS,cn=window.Element.prototype.removeAttributeNS,un=window.Element.prototype.insertAdjacentElement,ln=window.Element.prototype.prepend,hn=window.Element.prototype.append,pn=window.Element.prototype.before,dn=window.Element.prototype.after,fn=window.Element.prototype.replaceWith,mn=window.Element.prototype.remove,vn=window.HTMLElement,gn=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),yn=window.HTMLElement.prototype.insertAdjacentElement,bn=new function(){},_n=window.customElements;if(!_n||_n.forcePolyfill||"function"!=typeof _n.define||"function"!=typeof _n.get){var xn=new g;!function(t){window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=t.K(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=je.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,t.g(n),n;var r,i=n[r=n.length-1];if(i===bn)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=bn,Object.setPrototypeOf(i,e.prototype),t.g(i),i}return e.prototype=vn.prototype,e}()}(xn),function(t){Et(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.f(e);if(n)return new n.constructor}return e=je.call(this,e),t.g(e),e}),Et(Document.prototype,"importNode",function(e,n){return e=We.call(this,e,n),this.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.f(n);if(r)return new r.constructor}return e=Ve.call(this,e,n),t.g(e),e}),d(t,Document.prototype,{Sa:Xe,append:qe})}(xn),function(t){function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&_t(this)){r=Array(o);for(var a=0;a<o;a++)r[a]=i[a]}}if(n.set.call(this,e),r)for(e=0;e<r.length;e++)t.a(r[e])}}})}Et(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Je.call(this,e,n),_t(this))for(n=0;n<r.length;n++)t.b(r[n]);return e}return r=_t(e),n=Je.call(this,e,n),r&&t.a(e),_t(this)&&t.b(e),n}),Et(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=Ze.call(this,e),_t(this))for(var r=0;r<n.length;r++)t.b(n[r]);return e}return n=_t(e),r=Ze.call(this,e),n&&t.a(e),_t(this)&&t.b(e),r}),Et(Node.prototype,"cloneNode",function(e){return e=Ye.call(this,e),this.ownerDocument.__CE_hasRegistry?t.c(e):t.j(e),e}),Et(Node.prototype,"removeChild",function(e){var n=_t(e),r=Ke.call(this,e);return n&&t.a(e),r}),Et(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=Qe.call(this,e,n),_t(this))for(t.a(n),n=0;n<r.length;n++)t.b(r[n]);return e}r=_t(e);var i=Qe.call(this,e,n),o=_t(this);return o&&t.a(n),r&&t.a(e),o&&t.b(e),i}),$e&&$e.get?e(Node.prototype,$e):t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Ke.call(this,this.firstChild);Ze.call(this,document.createTextNode(t))}})})}(xn),function(t){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,i=void 0;if(_t(this)&&(i=[],wt(this,function(t){t!==r&&i.push(t)})),n.set.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];1===a.__CE_state&&t.disconnectedCallback(a)}return this.ownerDocument.__CE_hasRegistry?t.c(this):t.j(this),e}})}function n(e,n){Et(e,"insertAdjacentElement",function(e,r){var i=_t(r);return e=n.call(this,e,r),i&&t.a(r),_t(e)&&t.b(r),e})}if(tn?Et(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=tn.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),en&&en.get)e(Element.prototype,en);else if(gn&&gn.get)e(HTMLElement.prototype,gn);else{var r=je.call(document,"div");t.u(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return Ye.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(r.innerHTML=t;0<e.childNodes.length;)Ke.call(e,e.childNodes[0]);for(;0<r.childNodes.length;)Ze.call(e,r.childNodes[0])}})})}Et(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return rn.call(this,e,n);var r=nn.call(this,e);rn.call(this,e,n),n=nn.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),Et(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return sn.call(this,e,n,r);var i=an.call(this,e,n);sn.call(this,e,n,r),r=an.call(this,e,n),t.attributeChangedCallback(this,n,i,r,e)}),Et(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return on.call(this,e);var n=nn.call(this,e);on.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),Et(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return cn.call(this,e,n);var r=an.call(this,e,n);cn.call(this,e,n);var i=an.call(this,e,n);r!==i&&t.attributeChangedCallback(this,n,r,i,e)}),yn?n(HTMLElement.prototype,yn):un?n(Element.prototype,un):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),d(t,Element.prototype,{Sa:ln,append:hn}),function(t,e){var n=Element.prototype;n.before=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.pb.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.after=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];i=r.filter(function(t){return t instanceof Node&&_t(t)}),e.ob.apply(this,r);for(var o=0;o<i.length;o++)t.a(i[o]);if(_t(this))for(i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.replaceWith=function(n){for(var r=[],i=0;i<arguments.length;++i)r[i-0]=arguments[i];var i=r.filter(function(t){return t instanceof Node&&_t(t)}),o=_t(this);e.zb.apply(this,r);for(var a=0;a<i.length;a++)t.a(i[a]);if(o)for(t.a(this),i=0;i<r.length;i++)(o=r[i])instanceof Element&&t.b(o)},n.remove=function(){var n=_t(this);e.remove.call(this),n&&t.a(this)}}(t,{pb:pn,ob:dn,zb:fn,remove:mn})}(xn),document.__CE_hasRegistry=!0;var wn=new f(xn);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:wn})}var En,Tn={STYLE_RULE:1,na:7,MEDIA_RULE:4,Ea:1e3},Mn={rb:/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,port:/@import[^;]*;/gim,Ma:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\\n]|$)/gim,Qa:/(?:^[^;\\-\\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\\n]|$)?/gim,yb:/@apply\\s*\\(?[^);]*\\)?\\s*(?:[;\\n]|$)?/gim,Db:/[^;:]*?:[^;]*?var\\([^;]*\\)(?:[;\\n]|$)?/gim,xb:/^@[^\\s]*keyframes/,Ra:/\\s+/g},Sn=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?En=window.ShadyCSS.nativeCss:window.ShadyCSS?(St(window.ShadyCSS),window.ShadyCSS=void 0):St(window.WebComponents&&window.WebComponents.flags);var An=/(?:^|[;\\s{]\\s*)(--[\\w-]*?)\\s*:\\s*(?:((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^\\)]*?\\)|[^};{])+)|\\{([^\\}]*)\\}(?:(?=[;\\s}])|$))/gi,Rn=/(?:^|\\W+)@apply\\s*\\(?([^);\\n]*)\\)?/gi,Cn=/(--[\\w-]+)\\s*([:,;)]|$)/gi,Ln=/(animation\\s*:)|(animation-name\\s*:)/,Pn=/@media[^(]*(\\([^)]*\\))/,Nn=/\\{[^}]*\\}/g,On=null;h.prototype.a=function(t,e,n){t.__styleScoped?t.__styleScoped=null:this.i(t,e||"",n)},h.prototype.i=function(t,e,n){if(t.nodeType===Node.ELEMENT_NODE&&this.A(t,e,n),t="template"===t.localName?(t.content||t.Hb).childNodes:t.children||t.childNodes)for(var r=0;r<t.length;r++)this.i(t[r],e,n)},h.prototype.A=function(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(Yn);n?r&&Ot(t,e=r.replace("style-scope","").replace(e,"")):Ot(t,(r?r+" ":"")+"style-scope "+e)}},h.prototype.b=function(t,e,n){var r=t.__cssBuild;return Sn||"shady"===r?e=At(e,n):(t=It(t),e=this.T(e,t.is,t.$,n)+"\\n\\n"),e.trim()},h.prototype.T=function(t,e,n,r){var i=this.f(e,n);e=this.h(e);var o=this;return At(t,function(t){t.c||(o.V(t,e,i),t.c=!0),r&&r(t,e,i)})},h.prototype.h=function(t){return t?Xn+t:""},h.prototype.f=function(t,e){return e?"[is="+t+"]":t},h.prototype.V=function(t,e,n){this.j(t,this.g,e,n)},h.prototype.j=function(t,e,n,r){t.selector=t.D=this.o(t,e,n,r)},h.prototype.o=function(t,e,n,r){var i=t.selector.split(Fn);if(!Ct(t)){t=0;for(var o,a=i.length;t<a&&(o=i[t]);t++)i[t]=e.call(this,o,n,r)}return i.join(Fn)},h.prototype.g=function(t,e,n){var r=this,i=!1;return(t=(t=(t=t.trim()).replace(In,function(t,e,n){return":"+e+"("+n.replace(/\\s/g,"")+")"})).replace(Gn,Bn+" $1")).replace(Un,function(t,o,a){return i||(t=r.K(a,o,e,n),i=i||t.stop,o=t.qb,a=t.value),o+a})},h.prototype.K=function(t,e,n,r){var i,o=t.indexOf(kn);return 0<=t.indexOf(Bn)?t=this.S(t,r):0!==o&&(t=n?this.s(t,n):t),n=!1,0<=o&&(e="",n=!0),n&&(i=!0,n&&(t=t.replace(Vn,function(t,e){return" > "+e}))),{value:t=t.replace(Wn,function(t,e,n){return\'[dir="\'+n+\'"] \'+e+", "+e+\'[dir="\'+n+\'"]\'}),qb:e,stop:i}},h.prototype.s=function(t,e){return(t=t.split(qn))[0]+=e,t.join(qn)},h.prototype.S=function(t,e){var n=t.match(jn);return(n=n&&n[2].trim()||"")?n[0].match(Hn)?t.replace(jn,function(t,n,r){return e+r}):n.split(Hn)[0]===e?n:Zn:t.replace(Bn,e)},h.prototype.U=function(t){t.selector=t.parsedSelector,this.u(t),this.j(t,this.L)},h.prototype.u=function(t){t.selector===zn&&(t.selector="html")},h.prototype.L=function(t){return t.match(kn)?this.g(t,Dn):this.s(t.trim(),Dn)},i.Object.defineProperties(h.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var In=/:(nth[-\\w]+)\\(([^)]+)\\)/,Dn=":not(.style-scope)",Fn=",",Un=/(^|[\\s>+~]+)((?:\\[.+?\\]|[^\\s>+~=\\[])+)/g,Hn=/[[.:#*]/,Bn=":host",zn=":root",kn="::slotted",Gn=new RegExp("^("+kn+")"),jn=/(:host)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Vn=/(?:::slotted)(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))/,Wn=/(.*):dir\\((?:(ltr|rtl))\\)/,Xn=".",qn=":",Yn="class",Zn="should_not_match",Jn=new h;l.get=function(t){return t?t.__styleInfo:null},l.set=function(t,e){return t.__styleInfo=e},l.prototype.c=function(){return this.H},l.prototype._getStyleRules=l.prototype.c;var Kn=function(t){return t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}(window.Element.prototype),Qn=navigator.userAgent.match("Trident");u.prototype.V=function(t){var e=this,n={},r=[],i=0;for(var o in Lt(t,function(t){e.c(t),t.index=i++,e.U(t.v.cssText,n)},function(t){r.push(t)}),t.b=r,t=[],n)t.push(o);return t},u.prototype.c=function(t){if(!t.v){var e={},n={};this.b(t,n)&&(e.G=n,t.rules=null),e.cssText=this.T(t),t.v=e}},u.prototype.b=function(t,e){if(!(r=t.v)){for(var n,r=t.parsedCssText;t=An.exec(r);)"inherit"===(n=(t[2]||t[3]).trim())&&"unset"===n||(e[t[1].trim()]=n),n=!0;return n}if(r.G)return Object.assign(e,r.G),!0},u.prototype.T=function(t){return this.S(t.parsedCssText)},u.prototype.S=function(t){return t.replace(Nn,"").replace(An,"")},u.prototype.U=function(t,e){for(var n;n=Cn.exec(t);){var r=n[1];":"!==n[2]&&(e[r]=!0)}},u.prototype.ka=function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)t[e=n[r]]=this.a(t[e],t)},u.prototype.a=function(t,e){if(t)if(0<=t.indexOf(";"))t=this.f(t,e);else{var n=this;t=function t(e,n){var r,i=e.indexOf("var(");if(-1===i)return n(e,"","","");t:{var o=0;r=i+3;for(var a=e.length;r<a;r++)if("("===e[r])o++;else if(")"===e[r]&&!--o)break t;r=-1}return o=e.substring(i+4,r),i=e.substring(0,i),e=t(e.substring(r+1),n),-1===(r=o.indexOf(","))?n(i,o.trim(),"",e):n(i,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}(t,function(t,r,i,o){return r?((r=n.a(e[r],e))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=n.a(e[i]||i,e)||i,t+(r||"")+o):t+o})}return t&&t.trim()||""},u.prototype.f=function(t,e){t=t.split(";");for(var n,r,i=0;i<t.length;i++)if(n=t[i]){if(Rn.lastIndex=0,r=Rn.exec(n))n=this.a(e[r[1]],e);else if(-1!==(r=n.indexOf(":"))){var o=(o=n.substring(r)).trim();o=this.a(o,e)||o;n=n.substring(0,r)+o}t[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return t.join(";")},u.prototype.L=function(t,e){var n="";t.v||this.c(t),t.v.cssText&&(n=this.f(t.v.cssText,e)),t.cssText=n},u.prototype.K=function(t,e){var n=t.cssText,r=t.cssText;if(null==t.Oa&&(t.Oa=Ln.test(n)),t.Oa)if(null==t.ha)for(var i in t.ha=[],e)n!==(r=(r=e[i])(n))&&(n=r,t.ha.push(i));else{for(i=0;i<t.ha.length;++i)n=(r=e[t.ha[i]])(n);r=n}t.cssText=r},u.prototype.ja=function(t,e){var n={},r=this,i=[];return Lt(t,function(t){t.v||r.c(t);var o=t.D||t.parsedSelector;e&&t.v.G&&o&&Kn.call(e,o)&&(r.b(t,n),t=t.index,o=parseInt(t/32,10),i[o]=(i[o]||0)|1<<t%32)},null,!0),{G:n,key:i}},u.prototype.ma=function(t,e,n,r){if(e.v||this.c(e),e.v.G){t=(i=It(t)).is;var i=i.$,o=(i=t?Jn.f(t,i):"html",e.parsedSelector),a=":host > *"===o||"html"===o,s=0===o.indexOf(":host")&&!a;"shady"===n&&(s=!(a=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(a=":host > *"===o||"html"===o,s=s&&!a),(a||s)&&(n=i,s&&(Sn&&!e.D&&(e.D=Jn.o(e,Jn.g,Jn.h(t),i)),n=e.D||i),r({Cb:n,wb:s,Lb:a}))}},u.prototype.ia=function(t,e){var n={},r={},i=this,o=e&&e.__cssBuild;return Lt(e,function(e){i.ma(t,e,o,function(o){Kn.call(t.Ib||t,o.Cb)&&(o.wb?i.b(e,n):i.b(e,r))})},null,!0),{Ab:r,vb:n}},u.prototype.la=function(t,e,n){var r=this,i=It(t),o=Jn.f(i.is,i.$),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\\\"+o.slice(0,-1)+"\\\\]":o)+"($|[.:[\\\\s>+~])"),s=(i=l.get(t).H,this.h(i,n));return Jn.b(t,i,function(t){r.L(t,e),Sn||Ct(t)||!t.cssText||(r.K(t,s),r.o(t,a,o,n))})},u.prototype.h=function(t,e){t=t.b;var n={};if(!Sn&&t)for(var r=0,i=t[r];r<t.length;i=t[++r])this.j(i,e),n[i.keyframesName]=this.i(i);return n},u.prototype.i=function(t){return function(e){return e.replace(t.f,t.a)}},u.prototype.j=function(t,e){t.f=new RegExp(t.keyframesName,"g"),t.a=t.keyframesName+"-"+e,t.D=t.D||t.selector,t.selector=t.D.replace(t.keyframesName,t.a)},u.prototype.o=function(t,e,n,r){t.D=t.D||t.selector,r="."+r;for(var i,o=t.D.split(","),a=0,s=o.length;a<s&&(i=o[a]);a++)o[a]=i.match(e)?i.replace(n,r):r+" "+i;t.selector=o.join(",")},u.prototype.u=function(t,e,n){var r=t.getAttribute("class")||"",i=r;n&&(i=r.replace(new RegExp("\\\\s*x-scope\\\\s*"+n+"\\\\s*","g")," ")),r!==(i+=(i?" ":"")+"x-scope "+e)&&Ot(t,i)},u.prototype.A=function(t,e,n,r){e=r?r.textContent||"":this.la(t,e,n);var i=l.get(t),o=i.a;return o&&!Sn&&o!==r&&(o._useCount--,0>=o._useCount&&o.parentNode&&o.parentNode.removeChild(o)),Sn?i.a?(i.a.textContent=e,r=i.a):e&&(r=Pt(e,n,t.shadowRoot,i.b)):r?r.parentNode||(Qn&&-1<e.indexOf("@media")&&(r.textContent=e),Nt(r,null,i.b)):e&&(r=Pt(e,n,null,i.b)),r&&(r._useCount=r._useCount||0,i.a!=r&&r._useCount++,i.a=r),r},u.prototype.s=function(t,e){var n=Rt(t),r=this;t.textContent=At(n,function(t){var n=t.cssText=t.parsedCssText;t.v&&t.v.cssText&&(n=n.replace(Mn.Ma,"").replace(Mn.Qa,""),t.cssText=r.f(n,e))})},i.Object.defineProperties(u.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var $n=new u,tr={},er=window.customElements;if(er&&!Sn){var nr=er.define;er.define=function(t,e,n){var r=document.createComment(" Shady DOM styles for "+t+" "),i=document.head;return i.insertBefore(r,(On?On.nextSibling:null)||i.firstChild),On=r,tr[t]=r,nr.call(er,t,e,n)}}if(c.prototype.a=function(t,e,n){for(var r=0;r<n.length;r++){var i=n[r];if(t.G[i]!==e[i])return!1}return!0},c.prototype.b=function(t,e,n,r){var i=this.cache[t]||[];i.push({G:e,styleElement:n,F:r}),i.length>this.c&&i.shift(),this.cache[t]=i},c.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i=t[r];if(this.a(i,e,n))return i}},!Sn){var rr=new MutationObserver(Dt),ir=function(t){rr.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)ir(document);else{var or=function(){ir(document.body)};window.HTMLImports?window.HTMLImports.whenReady(or):requestAnimationFrame(function(){if("loading"===document.readyState){var t=function(){or(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else or()})}s=function(){Dt(rr.takeRecords())}}var ar,sr={},cr=Promise.resolve(),ur=null,lr=window.HTMLImports&&window.HTMLImports.whenReady||null,hr=null,pr=null;a.prototype.Na=function(){!this.enqueued&&pr&&(this.enqueued=!0,Ht(pr))},a.prototype.b=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.Na())},a.prototype.a=function(t){return t.__shadyCSSCachedStyle?t.__shadyCSSCachedStyle:t.getStyle?t.getStyle():t},a.prototype.c=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var r=this.a(n);if(r){var i=r.__appliedElement;if(i)for(var o=0;o<r.attributes.length;o++){var a=r.attributes[o];i.setAttribute(a.name,a.value)}r=i||r,hr&&hr(r),n.__shadyCSSCachedStyle=r}}}return t},a.prototype.addCustomStyle=a.prototype.b,a.prototype.getStyleForCustomStyle=a.prototype.a,a.prototype.processStyles=a.prototype.c,Object.defineProperties(a.prototype,{transformCallback:{get:function(){return hr},set:function(t){hr=t}},validateCallback:{get:function(){return pr},set:function(t){var e=!1;pr||(e=!0),pr=t,e&&this.Na()}}});var dr=new c;o.prototype.K=function(){s()},o.prototype.ia=function(t){return t+"-"+(this.s[t]=(this.s[t]||0)+1)},o.prototype.Za=function(t){return Rt(t)},o.prototype.ab=function(t){return At(t)},o.prototype.V=function(t){t=t.content.querySelectorAll("style");for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r.textContent),r.parentNode.removeChild(r)}return e.join("").trim()},o.prototype.ka=function(t){return(t=t.content.querySelector("style"))&&t.getAttribute("css-build")||""},o.prototype.prepareTemplate=function(t,e,n){if(!t.f){t.f=!0,t.name=e,t.extends=n,sr[e]=t;var r=this.ka(t),i=this.V(t);n={is:e,extends:n,Fb:r},Sn||Jn.a(t.content,e),this.c();var o=Rn.test(i)||An.test(i);Rn.lastIndex=0,An.lastIndex=0,i=Tt(i),o&&En&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.g=r,r=[],En||(r=$n.V(t._styleAst)),r.length&&!En||(e=this.ja(n,t._styleAst,Sn?t.content:null,tr[e]),t.a=e),t.c=r}},o.prototype.ja=function(t,e,n,r){if((e=Jn.b(t,e)).length)return Pt(e,t.is,n,r)},o.prototype.ma=function(t){var e,n,r=(i=It(t)).is,i=i.$,o=tr[r];return(r=sr[r])&&(e=r._styleAst,n=r.c),l.set(t,new l(e,o,n,0,i))},o.prototype.T=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ft)},o.prototype.U=function(){var t=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(e){t.A(e)},this.b.validateCallback=function(){requestAnimationFrame(function(){(t.b.enqueued||t.i)&&t.f()})})},o.prototype.c=function(){this.T(),this.U()},o.prototype.f=function(){if(this.c(),this.b){var t=this.b.processStyles();this.b.enqueued&&(En?this.Xa(t):(this.u(this.g,this.h),this.L(t)),this.b.enqueued=!1,this.i&&!En&&this.styleDocument())}},o.prototype.styleElement=function(t,e){var n=It(t).is,r=l.get(t);if(r||(r=this.ma(t)),this.j(t)||(this.i=!0),e&&(r.R=r.R||{},Object.assign(r.R,e)),En){if(r.R)for(var i in e=r.R)null===i?t.style.removeProperty(i):t.style.setProperty(i,e[i]);((i=sr[n])||this.j(t))&&i&&i.a&&!Ut(i)&&((Ut(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(this.c(),this.a&&this.a.transformRules(i._styleAst,n),i.a.textContent=Jn.b(t,r.H),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,cr.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1}))}(i)),Sn&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Jn.b(t,r.H)),r.H=i._styleAst)}else this.u(t,r),r.Ba&&r.Ba.length&&this.S(t,r)},o.prototype.o=function(t){return(t=t.getRootNode().host)?l.get(t)?t:this.o(t):this.g},o.prototype.j=function(t){return t===this.g},o.prototype.S=function(t,e){var n=It(t).is,r=dr.fetch(n,e.J,e.Ba),i=r?r.styleElement:null,o=e.F;e.F=r&&r.F||this.ia(n),i=$n.A(t,e.J,e.F,i),Sn||$n.u(t,e.F,o),r||dr.b(n,e.J,i,e.F)},o.prototype.u=function(t,e){var n=this.o(t),r=l.get(n),i=(n=Object.create(r.J||null),$n.ia(t,e.H));t=$n.ja(r.H,t).G,Object.assign(n,i.vb,t,i.Ab),this.la(n,e.R),$n.ka(n),e.J=n},o.prototype.la=function(t,e){for(var n in e){var r=e[n];(r||0===r)&&(t[n]=r)}},o.prototype.styleDocument=function(t){this.styleSubtree(this.g,t)},o.prototype.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||this.j(t))&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},o.prototype.Xa=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&this.Wa(n)}},o.prototype.L=function(t){for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);n&&$n.s(n,this.h.J)}},o.prototype.A=function(t){var e=this,n=Rt(t);Lt(n,function(t){Sn?Jn.u(t):Jn.U(t),En&&(e.c(),e.a&&e.a.transformRule(t))}),En?t.textContent=At(n):this.h.H.rules.push(n)},o.prototype.Wa=function(t){if(En&&this.a){var e=Rt(t);this.c(),this.a.transformRules(e),t.textContent=At(e)}},o.prototype.getComputedStyleValue=function(t,e){var n;return En||(n=(l.get(t)||l.get(this.o(t))).J[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},o.prototype.$a=function(t,e){var n=t.getRootNode();if((e=e?e.split(/\\s/):[],!(n=n.host&&n.host.localName))&&(r=t.getAttribute("class")))for(var r=r.split(/\\s/),i=0;i<r.length;i++)if(r[i]===Jn.c){n=r[i+1];break}n&&e.push(Jn.c,n),En||(n=l.get(t))&&n.F&&e.push($n.g,n.F),Ot(t,e.join(" "))},o.prototype.Ya=function(t){return l.get(t)},o.prototype.flush=o.prototype.K,o.prototype.prepareTemplate=o.prototype.prepareTemplate,o.prototype.styleElement=o.prototype.styleElement,o.prototype.styleDocument=o.prototype.styleDocument,o.prototype.styleSubtree=o.prototype.styleSubtree,o.prototype.getComputedStyleValue=o.prototype.getComputedStyleValue,o.prototype.setElementClass=o.prototype.$a,o.prototype._styleInfoForNode=o.prototype.Ya,o.prototype.transformCustomStyleForDocument=o.prototype.A,o.prototype.getStyleAst=o.prototype.Za,o.prototype.styleAstToString=o.prototype.ab,o.prototype.flushCustomStyles=o.prototype.f,Object.defineProperties(o.prototype,{nativeShadow:{get:function(){return Sn}},nativeCss:{get:function(){return En}}});var fr,mr,vr=new o;window.ShadyCSS&&(fr=window.ShadyCSS.ApplyShim,mr=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:vr,prepareTemplate:function(t,e,n){vr.f(),vr.prepareTemplate(t,e,n)},styleSubtree:function(t,e){vr.f(),vr.styleSubtree(t,e)},styleElement:function(t){vr.f(),vr.styleElement(t)},styleDocument:function(t){vr.f(),vr.styleDocument(t)},getComputedStyleValue:function(t,e){return vr.getComputedStyleValue(t,e)},nativeCss:En,nativeShadow:Sn},fr&&(window.ShadyCSS.ApplyShim=fr),mr&&(window.ShadyCSS.CustomStyleInterface=mr),function(){var t=window.customElements,e=window.HTMLImports;if(window.WebComponents=window.WebComponents||{},t&&t.polyfillWrapFlushCallback){var n,r=function(){if(n){var t=n;return n=null,t(),!0}},i=e.whenReady;t.polyfillWrapFlushCallback(function(t){n=t,i(r)}),e.whenReady=function(t){i(function(){r()?e.whenReady(t):t()})}}e.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}(),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \\nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \\n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}()}()}).call(self)}).call(this,n(0),n(2))},function(t,e,n){(window.customElements||{}).forcePolyfill=!0,n(19);const r=n(1)("R-Type:info");n(15),r("R-Type version:",n(3).version)},function(t,e,n){t.exports=n(20)}]);';
+}]);
\ No newline at end of file
diff --git a/mobile/tct-webuifw-tests07/tests/libs/dist/theme/default/images/dimmer/lightbulb.png b/mobile/tct-webuifw-tests07/tests/libs/dist/theme/default/images/dimmer/lightbulb.png
new file mode 100644 (file)
index 0000000..efacfd1
Binary files /dev/null and b/mobile/tct-webuifw-tests07/tests/libs/dist/theme/default/images/dimmer/lightbulb.png differ